public function let(TraceableEventDispatcher $dispatcher, EntityManager $em, Article $article, Language $language) { $article->getNumber()->willReturn(10); $article->getName()->willReturn("test article"); $article->getPublicationId()->willReturn(2); $article->getLanguageId()->willReturn(1); $article->getIssueId()->willReturn(20); $article->getSectionId()->willReturn(30); $em->getReference('Newscoop\\Entity\\Language', 1)->willReturn($language); $language->getCode()->willReturn('en'); $this->beConstructedWith($dispatcher, $em); }
private function getLogArray(Topic $topic, Article $article) { return array('title' => $topic->getTitle(), 'id' => array('Title' => $article->getName(), 'Number' => $article->getNumber(), 'IdLanguage' => $article->getLanguageId()), 'diff' => array('id' => $topic->getId(), 'title' => $topic->getTitle())); }
public function getName() { $this->__load(); return parent::getName(); }