mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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
This commit is contained in:
parent
5dff780a5d
commit
475361fafd
@ -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])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user