public function BiblioContributorUnitTest::testGrabSurname in Bibliography Module 7
Same name and namespace in other branches
- 6.2 tests/contributor.test \BiblioContributorUnitTest::testGrabSurname()
- 7.2 tests/contributor.test \BiblioContributorUnitTest::testGrabSurname()
File
- tests/
BiblioContributorUnitTest.test, line 30
Class
- BiblioContributorUnitTest
- Unit tests for contributor functions.
Code
public 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);
}