Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
CitationListTokenizerFilterTest.php
1 <?php
2 
17 import('lib.pkp.tests.PKPTestCase');
18 import('lib.pkp.classes.citation.CitationListTokenizerFilter');
19 
24  public function testCitationListTokenizerFilter() {
25  $tokenizer = new CitationListTokenizerFilter();
26  $rawCitationList = "\t1. citation1\n\n2 citation2\r\n 3) citation3\n[4]citation4";
27  $expectedResult = array(
28  'citation1',
29  'citation2',
30  'citation3',
31  'citation4'
32  );
33  self::assertEquals($expectedResult, $tokenizer->process($rawCitationList));
34 
35  $rawCitationList = '';
36  self::assertEquals(array(), $tokenizer->process($rawCitationList));
37  }
38 }
39 ?>
Class that takes an unformatted list of citations and returns an array of raw citation strings...
Test class for CitationListTokenizerFilter.
Class that implements functionality common to all PKP unit test cases.