Esempio n. 1
0
 public function testCanAddOneElementFromOneToManyCollection()
 {
     $this->entity->setOneToManyChild(null);
     $this->annotatedTestDao->create($this->entity);
     $this->entity = $this->annotatedTestDao->find($this->entity->getId());
     $this->assertEquals(0, count($this->entity->getOneToManyChild()));
     $this->entity->setOneToManyChild(array(new ChildTest()));
     $this->annotatedTestDao->update($this->entity);
     $this->entity = $this->annotatedTestDao->find($this->entity->getId());
     $this->assertEquals(1, count($this->entity->getOneToManyChild()));
 }