X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FPlugin%2FDMU%2FAnalyzer%2FTests.php;fp=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FPlugin%2FDMU%2FAnalyzer%2FTests.php;h=611c4454eb2b44336f057dc1797479300dc002b4;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35
diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Analyzer/Tests.php b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Analyzer/Tests.php
new file mode 100644
index 000000000..611c4454e
--- /dev/null
+++ b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Analyzer/Tests.php
@@ -0,0 +1,63 @@
+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;
+ }
+
+}