_getEntityManager(); $exporter = new Doctrine_ORM_Export_ClassExporter($em); $exporter->exportClasses(array($em->getClassMetadata('CmsUser'))); // Create $user = new CmsUser; $user->name = 'romanb'; $em->save($user); $this->assertTrue(is_numeric($user->id)); $this->assertTrue($em->contains($user)); $user2 = new CmsUser; $user2->name = 'jwage'; $em->save($user2); $this->assertTrue(is_numeric($user2->id)); $this->assertTrue($em->contains($user2)); // Read $user3 = $em->find('CmsUser', $user->id); $this->assertTrue($user === $user3); $user4 = $em->find('CmsUser', $user2->id); $this->assertTrue($user2 === $user4); } }