public function testApagaRegistroPassandoValorInteiro() { $this->_db->expects($this->once())->method('Consulta')->will($this->returnValue(TRUE)); $mapper = new CoreExt_EntityDataMapperStub($this->_db); $this->assertTrue($mapper->delete(1)); }
public function testResetarAdapterFazComQueODataMapperInstancieUmNovoAdapter() { CoreExt_EntityDataMapperStub::resetDefaultDbAdapter(); $entityMapper = new CoreExt_EntityDataMapperStub(); $this->assertNotSame($this->getDbAdapter(), $entityMapper->getDbAdapter()); }
public function testApagaRegistroUsandoValorInteiro() { $mapper = new CoreExt_EntityDataMapperStub($this->getDbAdapter()); $mapper->delete(1); $this->assertTablesEqual($this->createXMLDataSet($this->getFixture('pessoa-depois-removido.xml'))->getTable('pessoa'), $this->getConnection()->createDataSet()->getTable('pessoa')); }