|
1 <?php |
|
2 |
|
3 use CorpusParole\Libraries\Mergers\CocoonSoundRdfMerger; |
|
4 use CorpusParole\Libraries\Mergers\CocoonTextRdfMerger; |
|
5 use CorpusParole\Libraries\CocoonUtils; |
|
6 |
|
7 use EasyRdf\Graph; |
|
8 use EasyRdf\Resource; |
|
9 use EasyRdf\Literal; |
|
10 |
|
11 use Illuminate\Foundation\Testing\WithoutMiddleware; |
|
12 use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
13 use Illuminate\Foundation\Testing\DatabaseTransactions; |
|
14 |
|
15 class CocoonTextRdfMergerTest extends TestCase |
|
16 { |
|
17 |
|
18 const TEST_INPUT_DOCS = [ |
|
19 'SOUND' => <<<EOT |
|
20 @prefix ore: <http://www.openarchives.org/ore/terms/> . |
|
21 @prefix edm: <http://www.europeana.eu/schemas/edm/> . |
|
22 @prefix dc11: <http://purl.org/dc/elements/1.1/> . |
|
23 @prefix olac: <http://www.language-archives.org/OLAC/1.1/> . |
|
24 @prefix dc: <http://purl.org/dc/terms/> . |
|
25 @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . |
|
26 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
|
27 @prefix skos: <http://www.w3.org/2004/02/skos/core#> . |
|
28 @prefix owl: <http://www.w3.org/2002/07/owl#> . |
|
29 |
|
30 <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-UVE_MOCIKA_SOUND> |
|
31 a ore:Aggregation ; |
|
32 edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> ; |
|
33 edm:provider "Corpus de la Parole"@fr ; |
|
34 edm:dataProvider "Laboratoire de langues et civilisations à tradition orale" ; |
|
35 edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-UVE_MOCIKA_SOUND> ; |
|
36 edm:isShownBy <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ; |
|
37 edm:rights <http://creativecommons.org/licenses/by-nc-nd/4.0/> ; |
|
38 edm:hasView <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav>, <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3> . |
|
39 |
|
40 <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> |
|
41 a edm:ProvidedCHO ; |
|
42 dc11:description "Voilà pourquoi le bernard-l'hermite, aujourd'hui, se cache dans les coquilles vides qu'il trouve, alors que le crabe de cocotier n'a pas honte de se promener tout nu."@fr ; |
|
43 dc11:language <http://lexvo.org/id/iso639-3/uve> ; |
|
44 dc11:publisher "Laboratoire de langues et civilisations à tradition orale" ; |
|
45 dc11:rights "Copyright (c) Moyse-Faurie, Claire" ; |
|
46 dc11:type <http://purl.org/dc/dcmitype/Sound>, "primary_text"^^olac:linguistic-type, "narrative"^^olac:discourse-type, <http://ark.bnf.fr/ark:/12148/cb11937212q> ; |
|
47 dc:license <http://creativecommons.org/licenses/by-nc-nd/2.5/> ; |
|
48 dc11:subject <http://ark.bnf.fr/ark:/12148/cb11958119h>, <http://lexvo.org/id/iso639-3/uve>, <http://ark.bnf.fr/ark:/12148/cb11953067w> ; |
|
49 dc11:title "The two hermit crabs and the coconut crab"@en ; |
|
50 dc:accessRights "Freely available for non-commercial use" ; |
|
51 dc:extent "PT2M35S" ; |
|
52 edm:isGatheredInto <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ; |
|
53 olac:depositor <http://viaf.org/viaf/56614135> ; |
|
54 dc11:contributor <http://viaf.org/viaf/56614135>, "Idakote, Félicien" ; |
|
55 olac:researcher <http://viaf.org/viaf/56614135> ; |
|
56 olac:speaker "Idakote, Félicien" ; |
|
57 dc:available "2010-10-23"^^dc:W3CDTF ; |
|
58 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
59 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ; |
|
60 dc:modified "2012-03-25"^^dc:W3CDTF ; |
|
61 dc:spatial [ |
|
62 a edm:Place ; |
|
63 geo:lat "-20.46667"^^xsd:float ; |
|
64 geo:long "166.65"^^xsd:float ; |
|
65 skos:note "NC"^^dc:ISO3166, "New Caledonia, Ohnyat (Ouvéa)" ; |
|
66 owl:sameAs <http://sws.geonames.org/2139490/> |
|
67 ] . |
|
68 |
|
69 <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> |
|
70 a edm:WebResources ; |
|
71 dc:extent "PT2M35S" ; |
|
72 dc11:format "audio/x-wav"^^dc:IMT ; |
|
73 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
74 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF . |
|
75 |
|
76 <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav> |
|
77 a edm:WebResources ; |
|
78 dc:extent "PT2M35S" ; |
|
79 dc11:format "audio/x-wav"^^dc:IMT ; |
|
80 edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ; |
|
81 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
82 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF . |
|
83 |
|
84 <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3> |
|
85 a edm:WebResources ; |
|
86 dc:extent "PT2M35S" ; |
|
87 dc11:format "audio/mpeg"^^dc:IMT ; |
|
88 edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ; |
|
89 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
90 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF . |
|
91 EOT |
|
92 , |
|
93 'SOUND_NO_MOD' => <<<EOT |
|
94 @prefix ore: <http://www.openarchives.org/ore/terms/> . |
|
95 @prefix edm: <http://www.europeana.eu/schemas/edm/> . |
|
96 @prefix dc11: <http://purl.org/dc/elements/1.1/> . |
|
97 @prefix olac: <http://www.language-archives.org/OLAC/1.1/> . |
|
98 @prefix dc: <http://purl.org/dc/terms/> . |
|
99 @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . |
|
100 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
|
101 @prefix skos: <http://www.w3.org/2004/02/skos/core#> . |
|
102 @prefix owl: <http://www.w3.org/2002/07/owl#> . |
|
103 |
|
104 <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-UVE_MOCIKA_SOUND> |
|
105 a ore:Aggregation ; |
|
106 edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> ; |
|
107 edm:provider "Corpus de la Parole"@fr ; |
|
108 edm:dataProvider "Laboratoire de langues et civilisations à tradition orale" ; |
|
109 edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-UVE_MOCIKA_SOUND> ; |
|
110 edm:isShownBy <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ; |
|
111 edm:rights <http://creativecommons.org/licenses/by-nc-nd/4.0/> ; |
|
112 edm:hasView <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav>, <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3> . |
|
113 |
|
114 <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> |
|
115 a edm:ProvidedCHO ; |
|
116 dc11:description "Voilà pourquoi le bernard-l'hermite, aujourd'hui, se cache dans les coquilles vides qu'il trouve, alors que le crabe de cocotier n'a pas honte de se promener tout nu."@fr ; |
|
117 dc11:language <http://lexvo.org/id/iso639-3/uve> ; |
|
118 dc11:publisher "Laboratoire de langues et civilisations à tradition orale" ; |
|
119 dc11:rights "Copyright (c) Moyse-Faurie, Claire" ; |
|
120 dc11:type <http://purl.org/dc/dcmitype/Sound>, "primary_text"^^olac:linguistic-type, "narrative"^^olac:discourse-type, <http://ark.bnf.fr/ark:/12148/cb11937212q> ; |
|
121 dc:license <http://creativecommons.org/licenses/by-nc-nd/2.5/> ; |
|
122 dc11:subject <http://ark.bnf.fr/ark:/12148/cb11958119h>, <http://lexvo.org/id/iso639-3/uve>, <http://ark.bnf.fr/ark:/12148/cb11953067w> ; |
|
123 dc11:title "The two hermit crabs and the coconut crab"@en ; |
|
124 dc:accessRights "Freely available for non-commercial use" ; |
|
125 dc:extent "PT2M35S" ; |
|
126 edm:isGatheredInto <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ; |
|
127 olac:depositor <http://viaf.org/viaf/56614135> ; |
|
128 dc11:contributor <http://viaf.org/viaf/56614135>, "Idakote, Félicien" ; |
|
129 olac:researcher <http://viaf.org/viaf/56614135> ; |
|
130 olac:speaker "Idakote, Félicien" ; |
|
131 dc:available "2010-10-23"^^dc:W3CDTF ; |
|
132 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
133 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ; |
|
134 dc:spatial [ |
|
135 a edm:Place ; |
|
136 geo:lat "-20.46667"^^xsd:float ; |
|
137 geo:long "166.65"^^xsd:float ; |
|
138 skos:note "NC"^^dc:ISO3166, "New Caledonia, Ohnyat (Ouvéa)" ; |
|
139 owl:sameAs <http://sws.geonames.org/2139490/> |
|
140 ] . |
|
141 |
|
142 <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> |
|
143 a edm:WebResources ; |
|
144 dc:extent "PT2M35S" ; |
|
145 dc11:format "audio/x-wav"^^dc:IMT ; |
|
146 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
147 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF . |
|
148 |
|
149 <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav> |
|
150 a edm:WebResources ; |
|
151 dc:extent "PT2M35S" ; |
|
152 dc11:format "audio/x-wav"^^dc:IMT ; |
|
153 edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ; |
|
154 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
155 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF . |
|
156 |
|
157 <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3> |
|
158 a edm:WebResources ; |
|
159 dc:extent "PT2M35S" ; |
|
160 dc11:format "audio/mpeg"^^dc:IMT ; |
|
161 edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ; |
|
162 dc:created "1997-08-29"^^dc:W3CDTF ; |
|
163 dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF . |
|
164 EOT |
|
165 , |
|
166 'TEXT' => <<<EOT |
|
167 @prefix ore: <http://www.openarchives.org/ore/terms/> . |
|
168 @prefix edm: <http://www.europeana.eu/schemas/edm/> . |
|
169 @prefix dc11: <http://purl.org/dc/elements/1.1/> . |
|
170 @prefix olac: <http://www.language-archives.org/OLAC/1.1/> . |
|
171 @prefix dc: <http://purl.org/dc/terms/> . |
|
172 @prefix skos: <http://www.w3.org/2004/02/skos/core#> . |
|
173 |
|
174 <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-UVE_MOCIKA_SOUND> |
|
175 a ore:Aggregation ; |
|
176 edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> ; |
|
177 edm:provider "Corpus de la Parole"@fr ; |
|
178 edm:dataProvider <http://viaf.org/viaf/154919513> ; |
|
179 edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-UVE_MOCIKA_SOUND> ; |
|
180 edm:isShownBy <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xml> ; |
|
181 edm:rights <http://creativecommons.org/licenses/by-nc-sa/4.0/> ; |
|
182 edm:hasView <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xml>, <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xhtml> . |
|
183 |
|
184 <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> |
|
185 a edm:ProvidedCHO ; |
|
186 dc11:description "Voilà pourquoi le bernard-l'hermite, aujourd'hui, se cache dans les coquilles vides qu'il trouve, alors que le crabe de cocotier n'a pas honte de se promener tout nu."@fr ; |
|
187 dc11:language <http://lexvo.org/id/iso639-3/uve> ; |
|
188 dc11:publisher <http://viaf.org/viaf/154919513> ; |
|
189 dc11:rights "Copyright (c) Moyse-Faurie, Claire" ; |
|
190 dc11:type "primary_text"^^olac:linguistic-type, <http://purl.org/dc/dcmitype/Text>, "narrative"^^olac:discourse-type ; |
|
191 dc:license <http://creativecommons.org/licenses/by-nc-sa/2.5/> ; |
|
192 dc11:subject <http://lexvo.org/id/iso639-3/uve> ; |
|
193 dc11:title "The two hermit crabs and the coconut crab"@en ; |
|
194 dc:accessRights "Freely available for non-commercial use" ; |
|
195 edm:isGatheredInto <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ; |
|
196 dc:alternative "Les deux bernard-l'hermite et le crabe de cocotier"@fr ; |
|
197 olac:depositor <http://viaf.org/viaf/56614135> ; |
|
198 dc11:contributor <http://viaf.org/viaf/56614135>, "Moyse-Faurie, Claire", "Idakote, Félicien" ; |
|
199 olac:researcher "Moyse-Faurie, Claire" ; |
|
200 olac:speaker "Idakote, Félicien" ; |
|
201 dc:available "2011-02-05"^^dc:W3CDTF ; |
|
202 dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF ; |
|
203 dc:modified "2002-02-20"^^dc:W3CDTF ; |
|
204 dc:spatial [ |
|
205 a edm:Place ; |
|
206 skos:note "NC"^^dc:ISO3166, "New Caledonia, Ohnyat (Ouvéa)" |
|
207 ] . |
|
208 |
|
209 <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xml> |
|
210 a edm:WebResources ; |
|
211 dc11:format "application/xml"^^dc:IMT ; |
|
212 dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF . |
|
213 |
|
214 <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xhtml> |
|
215 a edm:WebResources ; |
|
216 dc11:format "application/xhtml+xml"^^dc:IMT ; |
|
217 dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF . |
|
218 EOT |
|
219 ]; |
|
220 |
|
221 |
|
222 private $inputGraphes = []; |
|
223 private $resGraph = []; |
|
224 |
|
225 function __construct(string $name = null) { |
|
226 parent::__construct($name); |
|
227 } |
|
228 |
|
229 public function setUp() { |
|
230 parent::setUp(); |
|
231 |
|
232 foreach(CocoonTextRdfMergerTest::TEST_INPUT_DOCS as $key => $inputDoc) { |
|
233 $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND", $inputDoc); |
|
234 } |
|
235 |
|
236 $merger = new CocoonTextRdfMerger(); |
|
237 $this->resGraph['SOUND_TEXT'] = $merger->mergeGraph($this->inputGraphes['SOUND'], $this->inputGraphes['TEXT']); |
|
238 $merger = new CocoonSoundRdfMerger(); |
|
239 $this->resGraph['TEXT_SOUND'] = $merger->mergeGraph($this->inputGraphes['TEXT'], $this->inputGraphes['SOUND']); |
|
240 $merger = new CocoonTextRdfMerger(); |
|
241 $this->resGraph['SOUND_NO_MOD_TEXT'] = $merger->mergeGraph($this->inputGraphes['SOUND_NO_MOD'], $this->inputGraphes['TEXT']); |
|
242 $merger = new CocoonSoundRdfMerger(); |
|
243 $this->resGraph['TEXT_SOUND_NO_MOD'] = $merger->mergeGraph($this->inputGraphes['TEXT'], $this->inputGraphes['SOUND_NO_MOD']); |
|
244 } |
|
245 |
|
246 public function tearDown() { |
|
247 parent::tearDown(); |
|
248 } |
|
249 |
|
250 /** |
|
251 * Just test that the construct and setup are ok |
|
252 * |
|
253 * @return void |
|
254 */ |
|
255 public function testInit() |
|
256 { |
|
257 $this->assertTrue(true); |
|
258 //echo $this->resGraph->serialise('turtle'); |
|
259 } |
|
260 |
|
261 /** |
|
262 * Test merge modified merge TEXT into SOUND |
|
263 * |
|
264 * @return void |
|
265 */ |
|
266 public function testModifiedSoundText() { |
|
267 |
|
268 $resGraph = $this->resGraph["SOUND_TEXT"]; |
|
269 |
|
270 $providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
|
271 $baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
|
272 $this->assertNotNull($providedCHO); |
|
273 $this->assertNotNull($baseNode); |
|
274 |
|
275 $outputValuesStr = []; |
|
276 foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
|
277 array_push($outputValuesStr, strval($outputValue)); |
|
278 } |
|
279 $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
|
280 foreach ($baseNode->all($this->inputGraphes['SOUND']->resource("http://purl.org/dc/terms/modified")) as $value) { |
|
281 $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
|
282 } |
|
283 |
|
284 } |
|
285 |
|
286 /** |
|
287 * Test one to one mapping |
|
288 * |
|
289 * @return void |
|
290 */ |
|
291 public function testModifiedTextSound() { |
|
292 |
|
293 $resGraph = $this->resGraph["TEXT_SOUND"]; |
|
294 |
|
295 $providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
|
296 $baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
|
297 $this->assertNotNull($providedCHO); |
|
298 $this->assertNotNull($baseNode); |
|
299 |
|
300 $outputValuesStr = []; |
|
301 foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
|
302 array_push($outputValuesStr, strval($outputValue)); |
|
303 } |
|
304 $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
|
305 foreach ($baseNode->all($this->inputGraphes['SOUND']->resource("http://purl.org/dc/terms/modified")) as $value) { |
|
306 $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
|
307 } |
|
308 |
|
309 } |
|
310 |
|
311 /** |
|
312 * Test one to one mapping |
|
313 * |
|
314 * @return void |
|
315 */ |
|
316 public function testSoundNoModifiedText() { |
|
317 |
|
318 $resGraph = $this->resGraph["SOUND_NO_MOD_TEXT"]; |
|
319 |
|
320 $providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
|
321 $baseNode = $this->inputGraphes['TEXT']->get('edm:ProvidedCHO', '^rdf:type'); |
|
322 $this->assertNotNull($providedCHO); |
|
323 $this->assertNotNull($baseNode); |
|
324 |
|
325 $outputValuesStr = []; |
|
326 foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
|
327 array_push($outputValuesStr, strval($outputValue)); |
|
328 } |
|
329 $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
|
330 // must contain the TEXT modified value (since SOUND has none) |
|
331 foreach ($baseNode->all($this->inputGraphes['TEXT']->resource("http://purl.org/dc/terms/modified")) as $value) { |
|
332 $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
|
333 } |
|
334 |
|
335 } |
|
336 |
|
337 |
|
338 /** |
|
339 * Test one to one mapping |
|
340 * |
|
341 * @return void |
|
342 */ |
|
343 public function testTextSoundNoModified() { |
|
344 |
|
345 $resGraph = $this->resGraph["TEXT_SOUND_NO_MOD"]; |
|
346 |
|
347 $providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
|
348 $baseNode = $this->inputGraphes['TEXT']->get('edm:ProvidedCHO', '^rdf:type'); |
|
349 $this->assertNotNull($providedCHO); |
|
350 $this->assertNotNull($baseNode); |
|
351 |
|
352 $outputValuesStr = []; |
|
353 foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
|
354 array_push($outputValuesStr, strval($outputValue)); |
|
355 } |
|
356 $this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
|
357 // must contain the TEXT modified value (since SOUND has none) |
|
358 foreach ($baseNode->all($this->inputGraphes['TEXT']->resource("http://purl.org/dc/terms/modified")) as $value) { |
|
359 $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
|
360 } |
|
361 |
|
362 } |
|
363 |
|
364 |
|
365 } |