コード例 #1
0
 /**
  * @expectedException \Exception
  */
 public function testInjectionWithMissingRelations()
 {
     $post = new Post();
     $post->setTitle('Foo');
     $post->setBody('Bar');
     $post->setSlug('foo-2');
     $this->_em->persist($post);
     $this->_em->flush();
     $webDev = $this->service->findTermByName('web_dev');
     $entityTerm = new EntityTerm();
     $entityTerm->setEntity($webDev);
     $this->_em->persist($entityTerm);
     $this->_em->flush();
 }