function BiblioContributorUnitTest::testGrabSurname in Bibliography Module 6.2
Same name and namespace in other branches
- 7 tests/BiblioContributorUnitTest.test \BiblioContributorUnitTest::testGrabSurname()
- 7.2 tests/contributor.test \BiblioContributorUnitTest::testGrabSurname()
File
- tests/
contributor.test, line 25
Class
Code
function testGrabSurname() {
$surname = 'van der Plus';
list($surname, $prefix) = _biblio_extract_surname_parts($surname);
$this
->assertIdentical($surname, 'Plus');
$this
->assertIdentical($prefix, 'van der');
$surname = 'Van den Bussche';
list($surname, $prefix) = _biblio_extract_surname_parts($surname);
$this
->assertIdentical($surname, 'Van den Bussche');
$this
->assertIdentical($prefix, FALSE);
}