示例#1
0
 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));
 }
示例#2
0
 public function testResetarAdapterFazComQueODataMapperInstancieUmNovoAdapter()
 {
     CoreExt_EntityDataMapperStub::resetDefaultDbAdapter();
     $entityMapper = new CoreExt_EntityDataMapperStub();
     $this->assertNotSame($this->getDbAdapter(), $entityMapper->getDbAdapter());
 }
示例#3
0
 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'));
 }