Beispiel #1
0
 public function testCRUD()
 {
     $entity = new Owner();
     $entity->setEmail(self::EMAIL);
     $entity->setPassword(self::PASSWORD);
     $this->dao->persist($entity);
     $this->assertEquals(self::ID, $entity->getId());
     $this->assertEquals(self::EMAIL, $entity->getEmail());
     $this->assertEquals(self::PASSWORD, $entity->getPassword());
     $entity = $this->dao->findById(self::ID);
     $this->assertEquals(self::ID, $entity->getId());
     $this->assertEquals(self::EMAIL, $entity->getEmail());
     $this->assertEquals(self::PASSWORD, $entity->getPassword());
     $entity->setPassword(self::PASSWORD_ANOTHER);
     $this->dao->persist($entity);
     $entity = $this->dao->findById(self::ID);
     $this->assertEquals(self::ID, $entity->getId());
     $this->assertEquals(self::EMAIL, $entity->getEmail());
     $this->assertEquals(self::PASSWORD_ANOTHER, $entity->getPassword());
     $this->dao->remove($entity);
     $this->assertNull($entity->getId());
     $this->assertNull($entity->getEmail());
     $this->assertNull($entity->getPassword());
 }
Beispiel #2
0
 public function entity(OwnerDTO $dto, Owner $entity)
 {
     $entity->setEmail($dto->getEmail());
     //		$entity->setPassword($dto->getPassword());
 }