|
@ -500,7 +500,7 @@ class BTBTest extends PHPUnit_Framework_TestCase { |
|
|
$this->assertEquals("Meyer, Heribert", $authors[0]); |
|
|
$this->assertEquals("Meyer, Heribert", $authors[0]); |
|
|
$this->assertEquals("Advanced Air and Ground Research Team", $authors[1]); |
|
|
$this->assertEquals("Advanced Air and Ground Research Team", $authors[1]); |
|
|
$this->assertEquals("Foo Bar", $authors[2]); |
|
|
$this->assertEquals("Foo Bar", $authors[2]); |
|
|
$this->assertEquals("Meyer, Heribert, Advanced Air and Ground Research Team, and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
$this->assertEquals("Meyer, Heribert, Advanced Air and Ground Research Team and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
// test with formatting (first name before)
|
|
|
// test with formatting (first name before)
|
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', true); |
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', true); |
|
@ -509,7 +509,7 @@ class BTBTest extends PHPUnit_Framework_TestCase { |
|
|
$this->assertEquals("Meyer, Heribert", $authors[0]); |
|
|
$this->assertEquals("Meyer, Heribert", $authors[0]); |
|
|
$this->assertEquals("Team, Advanced Air and Ground Research", $authors[1]); |
|
|
$this->assertEquals("Team, Advanced Air and Ground Research", $authors[1]); |
|
|
$this->assertEquals("Bar, Foo", $authors[2]); |
|
|
$this->assertEquals("Bar, Foo", $authors[2]); |
|
|
$this->assertEquals("Meyer, Heribert; Team, Advanced Air and Ground Research; and Bar, Foo", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
$this->assertEquals("Meyer, Heribert; Team, Advanced Air and Ground Research and Bar, Foo", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
// test with formatting (with initials) formatAuthorInitials
|
|
|
// test with formatting (with initials) formatAuthorInitials
|
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false); |
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false); |
|
@ -519,7 +519,7 @@ class BTBTest extends PHPUnit_Framework_TestCase { |
|
|
$this->assertEquals("Meyer H", $authors[0]); |
|
|
$this->assertEquals("Meyer H", $authors[0]); |
|
|
$this->assertEquals("Team AAand GR", $authors[1]); |
|
|
$this->assertEquals("Team AAand GR", $authors[1]); |
|
|
$this->assertEquals("Bar F", $authors[2]); |
|
|
$this->assertEquals("Bar F", $authors[2]); |
|
|
$this->assertEquals("Meyer H, Team AAand GR, and Bar F", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
$this->assertEquals("Meyer H, Team AAand GR and Bar F", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
// test with first_name last_name formatAuthorCanonical
|
|
|
// test with first_name last_name formatAuthorCanonical
|
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false); |
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false); |
|
@ -530,12 +530,14 @@ class BTBTest extends PHPUnit_Framework_TestCase { |
|
|
$this->assertEquals("Heribert Meyer", $authors[0]); |
|
|
$this->assertEquals("Heribert Meyer", $authors[0]); |
|
|
$this->assertEquals("Advanced Air and Ground Research Team", $authors[1]); |
|
|
$this->assertEquals("Advanced Air and Ground Research Team", $authors[1]); |
|
|
$this->assertEquals("Foo Bar", $authors[2]); |
|
|
$this->assertEquals("Foo Bar", $authors[2]); |
|
|
$this->assertEquals("Heribert Meyer, Advanced Air and Ground Research Team, and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
$this->assertEquals("Heribert Meyer, Advanced Air and Ground Research Team and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
|
|
|
|
|
|
// test there is no Oxford comma for only two authors with default options
|
|
|
|
|
|
|
|
|
// test Oxford comma with default options
|
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false); |
|
|
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false); |
|
|
bibtexbrowser_configure('USE_INITIALS_FOR_NAMES', false); |
|
|
bibtexbrowser_configure('USE_INITIALS_FOR_NAMES', false); |
|
|
bibtexbrowser_configure('USE_FIRST_THEN_LAST', false); |
|
|
bibtexbrowser_configure('USE_FIRST_THEN_LAST', false); |
|
|
|
|
|
bibtexbrowser_configure('USE_OXFORD_COMMA', true); |
|
|
|
|
|
$this->assertEquals("Meyer, Heribert, Advanced Air and Ground Research Team, and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
$entry = $db->getEntryByKey('bKey61'); |
|
|
$entry = $db->getEntryByKey('bKey61'); |
|
|
$this->assertEquals("Meyer, Heribert and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
$this->assertEquals("Meyer, Heribert and Foo Bar", $entry->getFormattedAuthorsString()); |
|
|
} |
|
|
} |
|
|