public function testCanPersistModel() { $model = new DummyEntity(); $this->assertNull($model->getId()); $this->entityManager->persist($model); $this->entityManager->flush(); $this->assertNotNull($model->getId()); }
public function testCanPersist() { $em = $this->getEntityManager(array(__DIR__ . '/TestAssets/metadata')); $this->createSchema($em); $this->assertNull($this->model->getId()); $em->persist($this->model); $em->flush(); $this->assertNotNull($this->model->getId()); }