Allow whitespaces between tags in assertTags()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6728 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2008-04-26 14:51:44 +00:00
parent 9bad5824cb
commit b7ec7dbbad

View file

@ -436,6 +436,7 @@ class CakeTestCase extends UnitTestCase {
* )
*
* Important: This function is very forgiving about whitespace and also accepts any permutation of attribute order.
* It will also allow whitespaces between specified tags.
*
* @param string $string An HTML/XHTML/XML string
* @param string $expected An array, see above
@ -499,7 +500,7 @@ class CakeTestCase extends UnitTestCase {
$regex[] = '[\s]*\/?[\s]*>[^<>]*';
}
}
$regex = '/^'.join('', $regex).'/Us';
$regex = '/^'.join('\s*', $regex).'/Us';
return $this->assertPattern($regex, $string, $message);
}
/**