@@ -74,6 +74,7 @@ private function createTestPublication(): void
7474 $ this ->publication ->setData ('authors ' , $ this ->authors );
7575 $ this ->publication ->setData ('locale ' , 'pt_BR ' );
7676 $ this ->publication ->setData ('relationStatus ' , '1 ' );
77+ $ this ->publication ->setData ('pub-id::doi ' , '10.1234/LepidusPreprints.1245 ' );
7778 }
7879
7980 private function addCurrentPublicationToSubmission (): void
@@ -82,7 +83,7 @@ private function addCurrentPublicationToSubmission(): void
8283 $ this ->submission ->setData ('publications ' , array ($ this ->publication ));
8384 }
8485
85- public function testHasDOIAsMarkup (): void
86+ public function testDatasetCitationGetsDoiMarkup (): void
8687 {
8788 $ expectedDOI = 'https://doi.org/10.12345/FK2/NTF9X8 ' ;
8889 $ dataCitation = "Iris Castanheiras, 2021, \"The Rise of The Machine Empire \", $ expectedDOI, Demo Dataverse, V1, UNF:6:dEgtc5Z1MSF3u7c+kF4kXg== [fileUNF] " ;
@@ -100,7 +101,8 @@ public function testHasDOIAsMarkup(): void
100101
101102 public function testPreprintCitationIsAPA (): void
102103 {
103- $ expectedSubmissionCitation = 'Castanheiras, I. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus ' ;
104+ $ expectedSubmissionCitation = 'Castanheiras, I. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus. ' ;
105+ $ expectedSubmissionCitation .= ' <a href="https://doi.org/10.1234/LepidusPreprints.1245">https://doi.org/10.1234/LepidusPreprints.1245</a> ' ;
104106
105107 $ apaCitation = new APACitation ();
106108 $ preprintCitation = $ apaCitation ->getFormattedCitationBySubmission ($ this ->submission );
@@ -116,7 +118,8 @@ public function testFamilyNameWithAccentOnTheFirstLetter(): void
116118 $ apaCitation = new APACitation ();
117119 $ preprintCitation = $ apaCitation ->getFormattedCitationBySubmission ($ this ->submission );
118120
119- $ expectedSubmissionCitation = 'Álamo, Á. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus ' ;
121+ $ expectedSubmissionCitation = 'Álamo, Á. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus. ' ;
122+ $ expectedSubmissionCitation .= ' <a href="https://doi.org/10.1234/LepidusPreprints.1245">https://doi.org/10.1234/LepidusPreprints.1245</a> ' ;
120123 $ this ->assertEquals ($ expectedSubmissionCitation , $ preprintCitation );
121124 }
122125
@@ -128,7 +131,8 @@ public function testGivenNameWithAccentAnyLetterExceptFirstLetterAndFamilyNameWi
128131 $ apaCitation = new APACitation ();
129132 $ preprintCitation = $ apaCitation ->getFormattedCitationBySubmission ($ this ->submission );
130133
131- $ expectedSubmissionCitation = 'Fernandes, M. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus ' ;
134+ $ expectedSubmissionCitation = 'Fernandes, M. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus. ' ;
135+ $ expectedSubmissionCitation .= ' <a href="https://doi.org/10.1234/LepidusPreprints.1245">https://doi.org/10.1234/LepidusPreprints.1245</a> ' ;
132136 $ this ->assertEquals ($ expectedSubmissionCitation , $ preprintCitation );
133137 }
134138
@@ -140,7 +144,8 @@ public function testFamilyNameWithAccentOnTheFirstLetterAndGivenNameWithoutAccen
140144 $ apaCitation = new APACitation ();
141145 $ preprintCitation = $ apaCitation ->getFormattedCitationBySubmission ($ this ->submission );
142146
143- $ expectedSubmissionCitation = 'Átila, L. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus ' ;
147+ $ expectedSubmissionCitation = 'Átila, L. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus. ' ;
148+ $ expectedSubmissionCitation .= ' <a href="https://doi.org/10.1234/LepidusPreprints.1245">https://doi.org/10.1234/LepidusPreprints.1245</a> ' ;
144149 $ this ->assertEquals ($ expectedSubmissionCitation , $ preprintCitation );
145150 }
146151
@@ -152,7 +157,8 @@ public function testGivenNameAndFamilyNameWithAccentExceptFirstLetter(): void
152157 $ apaCitation = new APACitation ();
153158 $ preprintCitation = $ apaCitation ->getFormattedCitationBySubmission ($ this ->submission );
154159
155- $ expectedSubmissionCitation = 'Sérgio, C. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus ' ;
160+ $ expectedSubmissionCitation = 'Sérgio, C. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus. ' ;
161+ $ expectedSubmissionCitation .= ' <a href="https://doi.org/10.1234/LepidusPreprints.1245">https://doi.org/10.1234/LepidusPreprints.1245</a> ' ;
156162 $ this ->assertEquals ($ expectedSubmissionCitation , $ preprintCitation );
157163 }
158164
@@ -163,7 +169,8 @@ public function testGivenNameWithAccentOnTheFirstLetter(): void
163169 $ apaCitation = new APACitation ();
164170 $ preprintCitation = $ apaCitation ->getFormattedCitationBySubmission ($ this ->submission );
165171
166- $ expectedSubmissionCitation = 'Castanheiras, Â. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus ' ;
172+ $ expectedSubmissionCitation = 'Castanheiras, Â. (2021). <em>The Rise of The Machine Empire</em>. Preprints da Lepidus. ' ;
173+ $ expectedSubmissionCitation .= ' <a href="https://doi.org/10.1234/LepidusPreprints.1245">https://doi.org/10.1234/LepidusPreprints.1245</a> ' ;
167174 $ this ->assertEquals ($ expectedSubmissionCitation , $ preprintCitation );
168175 }
169176}
0 commit comments