Allowing multiple closing tags of the same type for assertTags()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6724 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2008-04-26 14:12:33 +00:00
parent fae3b0386a
commit 2902969504

View file

@ -450,7 +450,10 @@ class CakeTestCase extends UnitTestCase {
} }
} }
foreach ($normalized as $tags) { foreach ($normalized as $tags) {
if (is_string($tags)) { if (is_string($tags) || (is_array($tags) && count($tags) == 1 && !empty($tags[0]))) {
if (is_array($tags)) {
$tags = $tags[0];
}
if ($tags{0} == '!') { if ($tags{0} == '!') {
$regex[] = '<[\s]*\/[\s]*'.substr($tags, 1).'[\s]*>'; $regex[] = '<[\s]*\/[\s]*'.substr($tags, 1).'[\s]*>';
continue; continue;