Example #1
0
 public function testDelete()
 {
     $testEntity = UserTest::createTestUser();
     self::$entityManager->persist($testEntity);
     self::$entityManager->flush();
     $entities = self::$entityManager->createQuery('SELECT e FROM Rexmac\\Zyndax\\Entity\\User e')->execute();
     $this->assertEquals(1, count($entities));
     UserService::delete($testEntity);
     $entities = self::$entityManager->createQuery('SELECT e FROM Rexmac\\Zyndax\\Entity\\User e')->execute();
     $this->assertEquals(0, count($entities));
 }