public function testFindWithoutSpecifiedConnection() { $this->_saveDataInFirst(); $found = \Model\Simple::findOne($this->_getSimpleData()); $this->assertInstanceOf('\\Model\\Simple', $found); }
/** * @expectedException \RuntimeException */ public function testDeleteCheckClearEntityManager() { $simple1 = new Simple(); $simple1->setColumn('foo'); $simple1->save(); $simple2 = new Simple(); $simple2->setColumn('bar'); $this->entityManager->persist($simple2); $simple1->delete(); }
/** * @expectedException \InvalidArgumentException */ public function testEntitySwapWithAnotherClassEntity() { $sortable = new Sortable(); $sortable->setTitle('foo'); $sortable->save(); $simple = new Simple(); $simple->setColumn('foo'); $simple->save(); $sortable->swapWith($simple); }