/** * Test an empty Group entity */ public function testEmptyGroup() { $group = new Group(); $this->assertNull($group->getId()); $this->assertNull($group->getName()); $this->assertNull($group->getDescription()); $this->assertNull($group->getCreatedBy()); $this->assertNull($group->getUpdatedBy()); $this->assertNull($group->getSlug()); }
/** * Convert object AppBundle\Entity\Group to AppBundle\Form\Entity\Group * * @param Group $group Group * * @return GroupForm[] */ public function convertToGroupForm(Group $group) { return (new GroupForm())->setName($group->getName())->setDescription($group->getDescription())->setCountry($group->getCountry())->setCity($group->getCity())->setFoundedAt($group->getFoundedAt()->format('Y')); }