public function ReportTest::test in Drupal 7 to 8/9 Module Upgrader 8
File
- tests/
src/ Unit/ ReportTest.php, line 23
Class
- ReportTest
- @group DMU
Namespace
Drupal\Tests\drupalmoduleupgrader\UnitCode
public function test() {
$issue = new Issue($this->target, 'Foo');
$this->report
->addIssue($issue);
$issue = new Issue($this->target, 'Baz');
$this->report
->addIssue($issue);
$issues = $this->report
->getIssues();
$this
->assertTrue(is_array($issues));
$this
->assertCount(2, $issues);
$this
->assertInstanceOf('\\Drupal\\drupalmoduleupgrader\\IssueInterface', $issues[0]);
$this
->assertEquals('Foo', $issues[0]
->getTitle());
$this
->assertInstanceOf('\\Drupal\\drupalmoduleupgrader\\IssueInterface', $issues[1]);
$this
->assertEquals('Baz', $issues[1]
->getTitle());
}