From 2902969504747f0937b70e0ed50d016fbb48d98e Mon Sep 17 00:00:00 2001 From: "mariano.iglesias" Date: Sat, 26 Apr 2008 14:12:33 +0000 Subject: [PATCH] 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 --- cake/tests/lib/cake_test_case.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 16a847684..b31a1338a 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -450,7 +450,10 @@ class CakeTestCase extends UnitTestCase { } } 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} == '!') { $regex[] = '<[\s]*\/[\s]*'.substr($tags, 1).'[\s]*>'; continue;