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