public function testUpdate() { $doc = new Document(); $doc->setName('doc 1'); $doc->insert(); $doc->setName('updated'); $doc->update(); $this->assertSame('updated', DbClient::findColumnById('Document', 'name', $doc->getId())); }
public function testFindColumnById() { $this->mockEngineMethod('findColumnById')->with($this->equalTo('table'), $this->equalTo('name'), $this->equalTo(1))->will($this->returnValue(true)); $this->assertTrue(DbClient::findColumnById('table', 'name', 1)); }