Skip to content

Commit

Permalink
Adding additional test cases for assertTags.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 23, 2011
1 parent daf1251 commit 73f4b8c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
Expand Up @@ -99,6 +99,26 @@ public function testAssertTagsQuotes() {
'/a'
);
$this->assertTrue($test->assertTags($input, $pattern), 'Single quoted attributes %s');

$input = "<span><strong>Text</strong></span>";
$pattern = array(
'<span',
'<strong',
'Text',
'/strong',
'/span'
);
$this->assertTrue($test->assertTags($input, $pattern), 'Tags with no attributes');

$input = "<span class='active'><strong>Text</strong></span>";
$pattern = array(
'span' => array('class'),
'<strong',
'Text',
'/strong',
'/span'
);
$this->assertTrue($test->assertTags($input, $pattern), 'Test attribute presence');
}

/**
Expand Down

0 comments on commit 73f4b8c

Please sign in to comment.