/** * @dataProvider revisions */ public function testFormatRevisionComment($law_id, $law_type, $law_title, $date, $comment, $add_Links, $expected) { $law = Law::create(['id' => $law_id, 'title' => $law_title]); $law->setTypes([$law_type]); $revision = new Revision(['law_id' => $law_id, 'date' => $date, 'comment' => $comment]); $this->assertEquals($expected, $this->formatter->formatRevisionComment($revision, $add_Links)); }
public function getRevisionFilePath(Revision $revision) { $path = $this->formatter->getLawURL($revision->law_id, $this->git->getHistoryDir()); $this->createDirs($path); return $path; }