1 common.test | CommonAutocompleteTagsTestCase::assertTags($tags) |
Helper function: asserts that the ending array of tags is what we wanted.
File
- core/
modules/ simpletest/ tests/ common.test, line 682 - Tests for common.inc functionality.
Class
Code
function assertTags($tags) {
$original = $this->validTags;
foreach ($tags as $tag) {
$key = array_search($tag, $original);
$this->assertTrue($key, format_string('Make sure tag %tag shows up in the final tags array (originally %original)', array('%tag' => $tag, '%original' => $key)));
unset($original[$key]);
}
foreach ($original as $leftover) {
$this->fail(format_string('Leftover tag %leftover was left over.', array('%leftover' => $leftover)));
}
}