protected function NodePreviewTest::assertNotError in Entity Print 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/NodePreviewTest.php \Drupal\Tests\entity_print\Kernel\NodePreviewTest::assertNotError()
Asserts that a specific error has been triggered.
Parameters
string $errstr: Error message.
int $errno: Error level.
1 call to NodePreviewTest::assertNotError()
- NodePreviewTest::testNodePreview in tests/
src/ Kernel/ NodePreviewTest.php - Tests that entity print link is not displayed in node preview.
File
- tests/
src/ Kernel/ NodePreviewTest.php, line 80
Class
- NodePreviewTest
- Tests the entity print link in node preview.
Namespace
Drupal\Tests\entity_print\KernelCode
protected function assertNotError($errstr, $errno) {
$status = FALSE;
foreach ($this->errors as $error) {
if ($error['errstr'] === $errstr && $error['errno'] === $errno) {
$status = TRUE;
break;
}
}
$this
->assertFalse($status, "Error: '{$errstr}' (level {$errno}) was not triggered.");
}