12 use PHPUnit\Framework\TestCase;
64 $testFiles = loadFixtures(
"bugfix-github-58");
65 $testData = json_decode(file_get_contents(PHPUNIT_FIXTURES.
"/$testFiles[0]"));
66 $mode = $testData->mode;
67 $citeProc =
new CiteProc($testData->csl);
68 $input = $testData->input;
69 $result = $citeProc->render($input, $mode);
70 $this->assertNotEmpty($result);
71 $this->assertTrue(isset($input[0]->title),
"Failed asserting that title property exists in input data");
79 $style =
"modern-language-association";
80 $input =
'[{"type": "book","accessed": {"date-parts": [["2016","01","01"]]},"publisher": "lol2","title": "lol"},{"type": "book","author": [{"given": "Daniel","suffix": "H.","family": "Nexon"},{"given": "Iver","suffix": "B.","family": "Neumann"}],"accessed": {"date-parts": [["2006","01","01"]]},"publisher": "Rowman & Littlefield","title": "Harry Potter and International Relations"}]';
82 $data = json_decode($input);
84 $this->assertNotTrue(isset($datum->author));
85 $result = $citeProc->render($data);
86 $this->assertNotEmpty($result);