More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / modules / contrib / security_review / tests / modules / security_review_test / src / Test.php
diff --git a/web/modules/contrib/security_review/tests/modules/security_review_test/src/Test.php b/web/modules/contrib/security_review/tests/modules/security_review_test/src/Test.php
new file mode 100644 (file)
index 0000000..4b0bf65
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+
+namespace Drupal\security_review_test;
+
+use Drupal\security_review\Check;
+use Drupal\security_review\CheckResult;
+
+/**
+ * A test security check for testing extensibility.
+ */
+class Test extends Check {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getNamespace() {
+    return 'Security Review Test';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getTitle() {
+    return 'Test';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function run() {
+    $findings = [];
+    for ($i = 0; $i < 20; ++$i) {
+      $findings[] = rand(0, 1) ? rand(0, 10) : 'string';
+    }
+
+    return $this->createResult(CheckResult::INFO, $findings);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function help() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getMessage($result_const) {
+    return 'The test ran.';
+  }
+
+}