protected function NgLightboxTest::assertNotContains in NG Lightbox 7
Asserts a string does not exist in the haystack.
Parameters
string $needle: The string to search for.
string $haystack: The string to search within.
string $message: The message to log.
Return value
bool TRUE if it was not found otherwise FALSE.
3 calls to NgLightboxTest::assertNotContains()
- NgLightboxTest::testAdminPathSetting in tests/
ng_lightbox.test - Test that the lightbox is disabled on admin paths.
- NgLightboxTest::testNgLightbox in tests/
ng_lightbox.test - Test the basic usage and settings.
- NgLightboxTest::testPatternMatching in tests/
ng_lightbox.test - Test the pattern matching for link paths.
File
- tests/
ng_lightbox.test, line 209 - NG Lightbox tests.
Class
- NgLightboxTest
- @file NG Lightbox tests.
Code
protected function assertNotContains($needle, $haystack, $message = '') {
if (empty($message)) {
$message = t('%needle was not found within %haystack', array(
'%needle' => $needle,
'%haystack' => $haystack,
));
}
return $this
->assertTrue(stripos($haystack, $needle) === FALSE, $message);
}