You are here

protected function AnalyzerTestBase::assertIssueDefaults in Drupal 7 to 8/9 Module Upgrader 8

Tests an issue generated by an analyzer to ensure that it has all the default values pulled from the plugin definition.

Parameters

$issue: The issue to test. Will be checked for IssueInterface conformance.

9 calls to AnalyzerTestBase::assertIssueDefaults()
DBTest::test in tests/src/Unit/Plugin/DMU/Analyzer/DBTest.php
FlagHookTest::test in tests/src/Unit/Plugin/DMU/Analyzer/FlagHookTest.php
FunctionCallTest::test in tests/src/Unit/Plugin/DMU/Analyzer/FunctionCallTest.php
HookFormAlterTest::testDerivedFormAlter in tests/src/Unit/Plugin/DMU/Analyzer/HookFormAlterTest.php
HookFormAlterTest::testHookFormAlter in tests/src/Unit/Plugin/DMU/Analyzer/HookFormAlterTest.php

... See full list

File

tests/src/Unit/Plugin/DMU/Analyzer/AnalyzerTestBase.php, line 34

Class

AnalyzerTestBase

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\Analyzer

Code

protected function assertIssueDefaults($issue) {
  $this
    ->assertInstanceOf('\\Drupal\\drupalmoduleupgrader\\IssueInterface', $issue);
  $plugin_definition = $this->analyzer
    ->getPluginDefinition();
  $this
    ->assertEquals($plugin_definition['message'], $issue
    ->getTitle());
  $this
    ->assertEquals($plugin_definition['summary'], $issue
    ->getSummary());
  $this
    ->assertSame($issue
    ->getDocumentation(), $plugin_definition['documentation']);
}