public function assertArticle(Article $article, $hash, $title, $author, $publicationDate, $content) { $this->assertEquals($article->getHash(), $hash); $this->assertEquals($article->getTitle(), $title); $this->assertEquals($article->getAuthor(), $author); $this->assertEquals($article->getPublicationDate(), $publicationDate); $this->assertEquals($article->getContent(), $content); }
public function add(Article $article) { $this->list[] = $article; $this->articleByHash[$article->getHash()] = $article; }