コード例 #1
0
ファイル: ResultTest.php プロジェクト: smasty/neevo
 public function testDetectTypesError()
 {
     $r = new ReflectionProperty('Neevo\\Result', 'columnTypes');
     $r->setAccessible(true);
     $this->result->getConnection()->getDriver()->setError('column-types');
     $this->result->detectTypes();
     $this->assertEquals(array(), $r->getValue($this->result));
 }
コード例 #2
0
ファイル: Row.php プロジェクト: smasty/neevo
 /**
  * Creates a row instance.
  * @param array $data
  * @param Result $result
  */
 public function __construct(array $data, Result $result)
 {
     $this->data = $data;
     $this->connection = $result->getConnection();
     $this->table = $result->getTable();
     $this->primary = $result->getPrimaryKey();
     $this->frozen = !$this->table || !$this->primary || !isset($this->data[$this->primary]);
 }
コード例 #3
0
ファイル: RowTest.php プロジェクト: smasty/neevo
 protected function setUp()
 {
     $this->result = new Result(new Connection('driver=Dummy'), 'author');
     $this->row = new Row($this->result->getConnection()->getDriver()->getRow(0), $this->result);
 }