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)); }
/** * 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]); }
protected function setUp() { $this->result = new Result(new Connection('driver=Dummy'), 'author'); $this->row = new Row($this->result->getConnection()->getDriver()->getRow(0), $this->result); }