当前位置: 首页>>代码示例>>PHP>>正文


PHP TestHelper::getPrivateProperty方法代码示例

本文整理汇总了PHP中TestHelper::getPrivateProperty方法的典型用法代码示例。如果您正苦于以下问题:PHP TestHelper::getPrivateProperty方法的具体用法?PHP TestHelper::getPrivateProperty怎么用?PHP TestHelper::getPrivateProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestHelper的用法示例。


在下文中一共展示了TestHelper::getPrivateProperty方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: constructor

 /**
  * @test
  */
 public function constructor()
 {
     $expressions = TestHelper::getPrivateProperty($this->where, 'expressions');
     $this->assertInstanceOf('\\Ackintosh\\Higher\\Query\\Expression\\ExpressionUnit', $expressions[0], '-> sets "ExpressionUnit" object.');
     $this->assertSame('AND', $expressions[1], '-> sets string.');
     $this->assertInstanceOf('\\Ackintosh\\Higher\\Query\\Expression\\ExpressionUnit', $expressions[2], '-> sets "ExpressionUnit" object.');
 }
开发者ID:ackintosh,项目名称:higher,代码行数:10,代码来源:WhereTest.php

示例2: setValue

 /**
  * @test
  */
 public function setValue()
 {
     $value = 'testvalue';
     $column = new Column($this->name, $this->type, $this->option);
     $column->setValue($value);
     $this->assertSame($value, TestHelper::getPrivateProperty($column, 'value'));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:10,代码来源:ColumnTest.php

示例3: constructorSetsProperties

 /**
  * @test
  */
 public function constructorSetsProperties()
 {
     $join = new Join($this->t1, $this->t2, $this->on);
     $this->assertSame($this->t1, TestHelper::getPrivateProperty($join, 'owner'));
     $this->assertSame($this->t2, TestHelper::getPrivateProperty($join, 'target'));
     $this->assertSame($this->on, TestHelper::getPrivateProperty($join, 'on'));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:10,代码来源:JoinTest.php

示例4: constructor

 /**
  * @test
  */
 public function constructor()
 {
     $str = 'foo';
     $val = [1, 2, 3];
     $sql = new Sql($str, $val);
     $this->assertSame($str, TestHelper::getPrivateProperty($sql, 'sql'), '-> sets string to its "sql" property.');
     $this->assertSame($val, TestHelper::getPrivateProperty($sql, 'values'), '-> sets array to its "values" property.');
 }
开发者ID:ackintosh,项目名称:higher,代码行数:11,代码来源:SqlTest.php

示例5: set

 /**
  * @test
  */
 public function set()
 {
     $table = new Table();
     $update = new Update($table);
     $params = ['foo' => 123, 'bar' => 456];
     $update->set($params);
     $this->assertInstanceOf('\\Ackintosh\\Higher\\Query\\Set', TestHelper::getPrivateProperty($update, 'set'), '-> sets "Set" object to "set" property.');
 }
开发者ID:ackintosh,项目名称:higher,代码行数:11,代码来源:UpdateTest.php

示例6: OrHasOR

 /**
  * @test
  */
 public function OrHasOR()
 {
     $table = new Table();
     $params[0] = '';
     $params[1] = '';
     $params[2] = '';
     $expression = new Orx($table, $params);
     $this->assertSame('OR', TestHelper::getPrivateProperty($expression, 'pre'));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:12,代码来源:OrxTest.php

示例7: valuesSetsProperty

 /**
  * @test
  */
 public function valuesSetsProperty()
 {
     $table = new Table();
     $columns = ['test1', 'test2'];
     $upsert = new Upsert($table, $columns);
     $values = ['value1', 'value2'];
     $upsert->values($values);
     $this->assertSame($values, TestHelper::getPrivateProperty($upsert, 'values'));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:12,代码来源:UpsertTest.php

示例8: setColumns

 /**
  * @test
  */
 public function setColumns()
 {
     $table = new Table();
     $schema = ['id' => ['int', 'sequence'], 'name' => ['varchar'], 'created' => ['datetime']];
     $record = new Record($table);
     $record->setColumns($schema);
     $columns = TestHelper::getPrivateProperty($record, 'columns');
     $this->assertSame(count($schema), count($columns), '-> sets number of columns the same as the schema information.');
     $this->assertSame(array_keys($schema), $record->getColumnNames(), '-> sets the column that has been defined in schema information.');
 }
开发者ID:ackintosh,项目名称:higher,代码行数:13,代码来源:RecordTest.php

示例9: joinPushesJoinObjecttoProperty

 /**
  * @test
  */
 public function joinPushesJoinObjecttoProperty()
 {
     $table = new Table();
     $columns = ['col1', 'col2'];
     $select = new Select($columns);
     $select->from($table);
     $table2 = new Table();
     $select->join($table2, ['on1' => 'on2']);
     $joins = TestHelper::getPrivateProperty($select, 'joins');
     $this->assertInstanceOf('Ackintosh\\Higher\\Query\\Join', array_pop($joins));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:14,代码来源:SelectTest.php

示例10: constructorSetsProperties

 /**
  * @test
  */
 public function constructorSetsProperties()
 {
     $table = new Table();
     $params[0] = 'testcolumn';
     $params[1] = 'testexpr';
     $params[2] = 'testvlaue';
     $expression = new Andx($table, $params);
     $this->assertSame($table, TestHelper::getPrivateProperty($expression, 'table'));
     $this->assertSame($params[0], TestHelper::getPrivateProperty($expression, 'column'));
     $this->assertSame($params[1], TestHelper::getPrivateProperty($expression, 'expr'));
     $this->assertSame($params[2], TestHelper::getPrivateProperty($expression, 'value'));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:15,代码来源:AndxTest.php

示例11: _orAddsObjectToProperty

 /**
  * @test
  */
 public function _orAddsObjectToProperty()
 {
     $this->unit->_or(new Table(), [0, 0, 0]);
     $exprs = TestHelper::getPrivateProperty($this->unit, 'exprs');
     $this->assertInstanceOf('Ackintosh\\Higher\\Query\\Expression\\Orx', array_pop($exprs));
 }
开发者ID:ackintosh,项目名称:higher,代码行数:9,代码来源:ExpressionUnitTest.php

示例12: constructor

 /**
  * @test
  */
 public function constructor()
 {
     $params = ['foo' => 123, 'bar' => 456];
     $set = new Set($params);
     $this->assertSame($params, TestHelper::getPrivateProperty($set, 'params'), '-> sets the params to "params" property.');
 }
开发者ID:ackintosh,项目名称:higher,代码行数:9,代码来源:SetTest.php


注:本文中的TestHelper::getPrivateProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。