You are here

function BiblioEndNoteTestCase::testEndNoteTagged in Bibliography Module 7.3

Test end note tagged.

File

tests/EndNote.test, line 25

Class

BiblioEndNoteTestCase
Test BibTeX style plugin.

Code

function testEndNoteTagged() {
  $data = '
%0 Book
%A Gary King
%B PS: Political Science and Politics
%D 2013
%G eng
%T Restructuring the Social Sciences: Reflections from Harvard’s Institute for Quantitative Social Science
%X The social sciences are undergoing a dramatic transformation from studying problems to solving them.';
  $expected_result = '%0 Book
%D 2013
%G eng
%T Restructuring the Social Sciences: Reflections from Harvard’s Institute for Quantitative Social Science
%X The social sciences are undergoing a dramatic transformation from studying problems to solving them.
%A Gary King
%B PS: Political Science and Politics';
  $biblio_style = biblio_get_class_from_style('endnote');
  $biblios = $biblio_style
    ->import($data);
  $biblio = $biblios['new'][0];
  $output = $biblio
    ->getText('endnote', array(
    'type' => 'tagged',
  ));
  $this
    ->assertEqual(trim($output), trim($expected_result), 'EndNote render is equal to the expected result');
}