Added the Porter Stemmer module to improve searches. This doesn't deal with some...
[yaffs-website] / web / modules / contrib / security_review / tests / modules / security_review_test / src / Test.php
1 <?php
2
3 namespace Drupal\security_review_test;
4
5 use Drupal\security_review\Check;
6 use Drupal\security_review\CheckResult;
7
8 /**
9  * A test security check for testing extensibility.
10  */
11 class Test extends Check {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getNamespace() {
17     return 'Security Review Test';
18   }
19
20   /**
21    * {@inheritdoc}
22    */
23   public function getTitle() {
24     return 'Test';
25   }
26
27   /**
28    * {@inheritdoc}
29    */
30   public function run() {
31     $findings = [];
32     for ($i = 0; $i < 20; ++$i) {
33       $findings[] = rand(0, 1) ? rand(0, 10) : 'string';
34     }
35
36     return $this->createResult(CheckResult::INFO, $findings);
37   }
38
39   /**
40    * {@inheritdoc}
41    */
42   public function help() {
43     return [];
44   }
45
46   /**
47    * {@inheritdoc}
48    */
49   public function getMessage($result_const) {
50     return 'The test ran.';
51   }
52
53 }