protected function DuplicatesTermMergeWebTestCase::assertSuggestedDuplicates in Term Merge 7
Assert expected terms indeed are suggested as duplicates.
Parameters
array $expected_terms: Array of terms that are expected to be suggested as duplicates
string $message: Assertion message to display on the test results
1 call to DuplicatesTermMergeWebTestCase::assertSuggestedDuplicates()
- DuplicatesTermMergeWebTestCase::testDuplicates in ./
term_merge.test - Test merging duplicates feature of Term Merge module.
File
- ./
term_merge.test, line 1072 - Test the Term Merge module.
Class
- DuplicatesTermMergeWebTestCase
- Test the Merge Duplicate Terms feature of the Term Merge module.
Code
protected function assertSuggestedDuplicates($expected_terms, $message = '') {
$i = 0;
foreach ($expected_terms as $term) {
$this
->assertPattern('#\\<input\\s+[^>]*type="checkbox"\\s+[^>]*name="[^"]+\\[duplicates]\\[' . $term->tid . '\\]"#si', $message . ' (for term #' . $i . ')');
$i++;
}
}