From 475361fafd44640ca4484fb4e3a77f4e5d7eb446 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 26 May 2008 06:24:06 +0000 Subject: [PATCH] API CHANGE Improved FunctionalTest's match by selector commands to produce less brittle output (rationalises whitespace) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@55136 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- testing/FunctionalTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/FunctionalTest.php b/testing/FunctionalTest.php index 17a6e3feb..ddaa63ffc 100644 --- a/testing/FunctionalTest.php +++ b/testing/FunctionalTest.php @@ -132,7 +132,7 @@ class FunctionalTest extends SapphireTest { */ function assertPartialMatchBySelector($selector, $expectedMatches) { $items = $this->cssParser()->getBySelector($selector); - foreach($items as $item) $actuals[] = trim(preg_replace("/[ \n\r\t]+/", " ", $item. '')); + foreach($items as $item) $actuals[trim(preg_replace("/[ \n\r\t]+/", " ", $item. ''))] = true; foreach($expectedMatches as $match) { if(!isset($actuals[$match])) {