You are here

function BiblioContributorUnitTest::testBiblioParseAuthor in Bibliography Module 6.2

Same name and namespace in other branches
  1. 7 tests/BiblioContributorUnitTest.test \BiblioContributorUnitTest::testBiblioParseAuthor()
  2. 7.2 tests/contributor.test \BiblioContributorUnitTest::testBiblioParseAuthor()

File

tests/contributor.test, line 64

Class

BiblioContributorUnitTest

Code

function testBiblioParseAuthor() {
  $author['name'] = 'Bush, Jr. III, George W';
  $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');
}