Test.php in Security Review 8
File
tests/modules/security_review_test/src/Test.php
View source
<?php
namespace Drupal\security_review_test;
use Drupal\security_review\Check;
use Drupal\security_review\CheckResult;
class Test extends Check {
public function getNamespace() {
return 'Security Review Test';
}
public function getTitle() {
return 'Test';
}
public function run() {
$findings = [];
for ($i = 0; $i < 20; ++$i) {
$findings[] = rand(0, 1) ? rand(0, 10) : 'string';
}
return $this
->createResult(CheckResult::INFO, $findings);
}
public function help() {
return [];
}
public function getMessage($result_const) {
return 'The test ran.';
}
}
Classes
Name |
Description |
Test |
A test security check for testing extensibility. |