public function CheckWebTest::testSkipCheck in Security Review 8
Tests Check::skip().
Checks whether skip() marks the check as skipped, and checks the skippedBy() value.
File
- tests/
src/ Functional/ CheckWebTest.php, line 64
Class
- CheckWebTest
- Contains tests for Check that don't suffice with KernelTestBase.
Namespace
Drupal\Tests\security_review\FunctionalCode
public function testSkipCheck() {
foreach ($this->checks as $check) {
$check
->skip();
$is_skipped = $check
->isSkipped();
$skipped_by = $check
->skippedBy();
$this
->assertTrue($is_skipped, $check
->getTitle() . ' skipped.');
$this
->assertEqual($this->user
->id(), $skipped_by
->id(), 'Skipped by ' . $skipped_by
->label());
}
}