Exemplo n.º 1
0
 public function testNotBlankValidation()
 {
     $notBlank = array('title');
     $this->validateNotBlanks($notBlank);
     $this->object->setTitle('test');
     $this->validate(0);
 }
Exemplo n.º 2
0
 public function load(ObjectManager $manager)
 {
     $data = $this->container->get('ilioscore.dataloader.department')->getAll();
     foreach ($data as $arr) {
         $entity = new Department();
         $entity->setId($arr['id']);
         $manager->persist($entity);
         $this->addReference('departments' . $arr['id'], $entity);
     }
     $manager->flush();
 }
Exemplo n.º 3
0
 /**
  * @covers \Ilios\CoreBundle\Entity\Department::__construct
  */
 public function testConstructor()
 {
     $this->assertEmpty($this->object->getStewards());
 }