getInfo() in test classes replaced by doc comments") * }, * { * "url" = "https://www.drupal.org/node/1710766", * "title" = @Translation("Test classes should define a $modules property declaring dependencies") * }, * { * "url" = "https://www.drupal.org/node/1911318", * "title" = @Translation("SimpleTest tests now use empty "testing" profile by default") * }, * { * "url" = "https://www.drupal.org/node/1829160", * "title" = @Translation("New KernelTestBase class for API-level integration tests") * }, * { * "url" = "https://www.drupal.org/node/2012184", * "title" = @Translation("PHPUnit added to Drupal core") * } * }, * tags = { * "category" = { "misc", "system" } * }, * message = @Translation("Automated web tests must be in a PSR-4 namespace, and unit tests must be converted to PHPUnit.") * ) */ class Tests extends AnalyzerBase { /** * {@inheritdoc} */ public function analyze(TargetInterface $target) { $issues = []; $total = 0; $total += $target->getIndexer('class')->getQuery()->condition('parent', 'DrupalWebTestCase')->countQuery()->execute(); $total += $target->getIndexer('class')->getQuery()->condition('parent', 'DrupalUnitTestCase')->countQuery()->execute(); $total += $target->getIndexer('class')->getQuery()->condition('parent', 'DrupalTestBase')->countQuery()->execute(); if ($total) { $issues[] = $this->buildIssue($target); } return $issues; } }