當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。