From b7ec7dbbad6c73f5a6e19b0da9e85f0992a0257c Mon Sep 17 00:00:00 2001 From: "mariano.iglesias" Date: Sat, 26 Apr 2008 14:51:44 +0000 Subject: [PATCH] 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 --- cake/tests/lib/cake_test_case.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 1eb37bb09..bd0b4509c 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -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); } /**