From 19e0d5e3d5d144d7fc1858b9a2fe6433421e2757 Mon Sep 17 00:00:00 2001 From: Michael Parkhill Date: Fri, 27 Jun 2014 16:05:40 +1200 Subject: [PATCH] FIX declarations matching PHPUnit_Framework_Assert FIX for phpunit error message: ERROR [Strict Notice]: Declaration of SapphireTest::assertNotContains() should be compatible with PHPUnit_Framework_Assert::assertNotContains, and the same error for assertContains() --- dev/SapphireTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 4e4c7d9eb..c6b7600d6 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -508,10 +508,11 @@ class SapphireTest extends PHPUnit_Framework_TestCase { $haystack, $message = '', $ignoreCase = FALSE, - $checkForObjectIdentity = TRUE + $checkForObjectIdentity = TRUE, + $checkForNonObjectIdentity = false ) { if ($haystack instanceof DBField) $haystack = (string)$haystack; - parent::assertContains($needle, $haystack, $message, $ignoreCase, $checkForObjectIdentity); + parent::assertContains($needle, $haystack, $message, $ignoreCase, $checkForObjectIdentity, $checkForNonObjectIdentity); } public static function assertNotContains( @@ -519,10 +520,11 @@ class SapphireTest extends PHPUnit_Framework_TestCase { $haystack, $message = '', $ignoreCase = FALSE, - $checkForObjectIdentity = TRUE + $checkForObjectIdentity = TRUE, + $checkForNonObjectIdentity = false ) { if ($haystack instanceof DBField) $haystack = (string)$haystack; - parent::assertNotContains($needle, $haystack, $message, $ignoreCase, $checkForObjectIdentity); + parent::assertNotContains($needle, $haystack, $message, $ignoreCase, $checkForObjectIdentity, $checkForNonObjectIdentity); } /**