You are here

public function IssueTest::testDocumentation in Drupal 7 to 8/9 Module Upgrader 8

File

tests/src/Unit/IssueTest.php, line 33

Class

IssueTest
@group DMU

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit

Code

public function testDocumentation() {
  $this->issue
    ->addDocumentation('http://www.google.com', 'Just Google it, baby!');
  $documentation = $this->issue
    ->getDocumentation();
  $this
    ->assertInternalType('array', $documentation);
  $this
    ->assertCount(1, $documentation);
  $this
    ->assertArrayHasKey('url', $documentation[0]);
  $this
    ->assertArrayHasKey('title', $documentation[0]);
  $this
    ->assertEquals('http://www.google.com', $documentation[0]['url']);
  $this
    ->assertEquals('Just Google it, baby!', $documentation[0]['title']);
}