protected function FilterSpamspanUnitTest::wrappedAssert in SpamSpan filter 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/FilterSpamspanUnitTest.php \Drupal\Tests\spamspan\Kernel\FilterSpamspanUnitTest::wrappedAssert()
Wrapper function.
Conveniently wraps some text around main test subject and then asserts.
1 call to FilterSpamspanUnitTest::wrappedAssert()
- FilterSpamspanUnitTest::variatedAssert in tests/
src/ Kernel/ FilterSpamspanUnitTest.php - Helper function to assert variations.
File
- tests/
src/ Kernel/ FilterSpamspanUnitTest.php, line 95
Class
- FilterSpamspanUnitTest
- Tests spamspan filter.
Namespace
Drupal\Tests\spamspan\KernelCode
protected function wrappedAssert($filter, $input, $shouldbe, $prefix = '', $suffix = '', $message = '') {
$output = $filter
->process($prefix . $input . $suffix, 'und')
->getProcessedText();
if (empty($message)) {
$this
->assertSame($output, $prefix . $shouldbe . $suffix);
}
else {
$this
->assertSame($output, $prefix . $shouldbe . $suffix, $message);
}
}