function BiblioWebTestCase::assertBiblioFields in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 tests/biblio.test \BiblioWebTestCase::assertBiblioFields()
- 7 tests/BiblioWebTestCase.test \BiblioWebTestCase::assertBiblioFields()
4 calls to BiblioWebTestCase::assertBiblioFields()
- BiblioImportExportUnitTest::testBiblioBibtexFileImport in tests/
import.export.test - BiblioImportExportUnitTest::testBiblioRISFileImport in tests/
import.export.test - BiblioImportExportUnitTest::testBiblioTaggedFileImport in tests/
import.export.test - BiblioImportExportUnitTest::testBiblioXMLFileImport in tests/
import.export.test
File
- tests/
biblio.test, line 79
Class
Code
function assertBiblioFields($node1, $node2, $fields = array()) {
$count = 0;
foreach ($fields as $field) {
if ($node1->{$field} != $node2->{$field}) {
$this
->assertIdentical($node1->{$field}, $node2->{$field});
$count++;
}
}
$this
->assertEqual($count, 0, "There were {$count} differences between the two nodes");
}