assertText() and assertNoText() allow me to check if some text is present or not.
How about checking if the text is unique or present more than once?
Here is a patch which allow you to do that.
$this->drupalGet('some/path'); $this->assertUniqueText('forum'); $this->assertNoUniqueText('download');
If this sounds interesting, please change the status to "patch need review".
|#10||402804-simpletest-unique-match.patch||5.57 KB||Damien Tournoud|
|#9||402804-simpletest-unique-match.patch||5.57 KB||Damien Tournoud|
Passed: 10619 passes, 0 fails, 0 exceptions View
Failed: 10584 passes, 1 fail, 0 exceptions View