public function BiblioContributorUnitTest::testBiblioParseAuthor in Bibliography Module 7
Same name and namespace in other branches
- 6.2 tests/contributor.test \BiblioContributorUnitTest::testBiblioParseAuthor()
- 7.2 tests/contributor.test \BiblioContributorUnitTest::testBiblioParseAuthor()
File
- tests/
BiblioContributorUnitTest.test, line 76
Class
- BiblioContributorUnitTest
- Unit tests for contributor functions.
Code
public function testBiblioParseAuthor() {
$author['name'] = 'Bush, Jr. III, George W';
$author['auth_category'] = 1;
$author = biblio_parse_author($author);
$this
->assertIdentical($author['firstname'], 'George', 'Test biblio_parse_author($author), firstname');
$this
->assertIdentical($author['lastname'], 'Bush', 'Test biblio_parse_author($author), lastname');
$this
->assertIdentical($author['initials'], 'W', 'Test biblio_parse_author($author), initials');
$this
->assertIdentical($author['suffix'], 'Jr. III', 'Test biblio_parse_author($author), suffix');
}