mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 10:36:16 +00:00
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:
parent
9bad5824cb
commit
b7ec7dbbad
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue