author | ymh <ymh.work@gmail.com> |
Wed, 22 Feb 2017 14:44:28 +0100 | |
changeset 520 | d6adc4047ede |
parent 504 | 4ab820b387da |
child 526 | cdaf9dfb5dfd |
permissions | -rw-r--r-- |
114
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
use CorpusParole\Libraries\Mergers\CocoonSoundRdfMerger; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
use CorpusParole\Libraries\Mergers\CocoonTextRdfMerger; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
use CorpusParole\Libraries\CocoonUtils; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
use EasyRdf\Graph; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
use EasyRdf\Resource; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
use EasyRdf\Literal; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
use Illuminate\Foundation\Testing\WithoutMiddleware; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
use Illuminate\Foundation\Testing\DatabaseMigrations; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
use Illuminate\Foundation\Testing\DatabaseTransactions; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
class CocoonTextRdfMergerTest extends TestCase |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
{ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
const TEST_INPUT_DOCS = [ |
504
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
18 |
'SOUND' => __DIR__.'/files/CocoonTextRdfMergerTest/sound.ttl', |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
19 |
'SOUND_NO_MOD' => __DIR__.'/files/CocoonTextRdfMergerTest/sound_no_mod.ttl', |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
20 |
'SOUND_NO_CREATED' => __DIR__.'/files/CocoonTextRdfMergerTest/sound_no_created.ttl', |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
21 |
'TEXT' => __DIR__.'/files/CocoonTextRdfMergerTest/text.ttl', |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
22 |
'TEXT_CREATED' => __DIR__.'/files/CocoonTextRdfMergerTest/text_created.ttl' |
114
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
]; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
private $inputGraphes = []; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
private $resGraph = []; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
function __construct(string $name = null) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
parent::__construct($name); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
public function setUp() { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
parent::setUp(); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
foreach(CocoonTextRdfMergerTest::TEST_INPUT_DOCS as $key => $inputDoc) { |
504
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
36 |
$this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND", file_get_contents($inputDoc)); |
114
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
37 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
38 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
39 |
$merger = new CocoonTextRdfMerger(); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
40 |
$this->resGraph['SOUND_TEXT'] = $merger->mergeGraph($this->inputGraphes['SOUND'], $this->inputGraphes['TEXT']); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
41 |
$merger = new CocoonSoundRdfMerger(); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
42 |
$this->resGraph['TEXT_SOUND'] = $merger->mergeGraph($this->inputGraphes['TEXT'], $this->inputGraphes['SOUND']); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
43 |
$merger = new CocoonTextRdfMerger(); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
44 |
$this->resGraph['SOUND_NO_MOD_TEXT'] = $merger->mergeGraph($this->inputGraphes['SOUND_NO_MOD'], $this->inputGraphes['TEXT']); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
45 |
$merger = new CocoonSoundRdfMerger(); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
46 |
$this->resGraph['TEXT_SOUND_NO_MOD'] = $merger->mergeGraph($this->inputGraphes['TEXT'], $this->inputGraphes['SOUND_NO_MOD']); |
504
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
47 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
48 |
$merger = new CocoonSoundRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
49 |
$this->resGraph['CREATED_TEXT_NO_CREATED_SOUND_NO_CREATED'] = $merger->mergeGraph($this->inputGraphes['TEXT'], $this->inputGraphes['SOUND_NO_CREATED']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
50 |
$merger = new CocoonSoundRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
51 |
$this->resGraph['CREATED_TEXT_SOUND_NO_CREATED'] = $merger->mergeGraph($this->inputGraphes['TEXT_CREATED'], $this->inputGraphes['SOUND_NO_CREATED']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
52 |
$merger = new CocoonSoundRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
53 |
$this->resGraph['CREATED_TEXT_NO_CREATED_SOUND'] = $merger->mergeGraph($this->inputGraphes['TEXT'], $this->inputGraphes['SOUND']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
54 |
$merger = new CocoonSoundRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
55 |
$this->resGraph['CREATED_TEXT_SOUND'] = $merger->mergeGraph($this->inputGraphes['TEXT_CREATED'], $this->inputGraphes['SOUND']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
56 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
57 |
$merger = new CocoonTextRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
58 |
$this->resGraph['CREATED_SOUND_NO_CREATED_TEXT_NO_CREATED'] = $merger->mergeGraph($this->inputGraphes['SOUND_NO_CREATED'], $this->inputGraphes['TEXT']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
59 |
$merger = new CocoonTextRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
60 |
$this->resGraph['CREATED_SOUND_TEXT_NO_CREATED'] = $merger->mergeGraph($this->inputGraphes['SOUND'], $this->inputGraphes['TEXT']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
61 |
$merger = new CocoonTextRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
62 |
$this->resGraph['CREATED_SOUND_NO_CREATED_TEXT'] = $merger->mergeGraph($this->inputGraphes['SOUND_NO_CREATED'], $this->inputGraphes['TEXT_CREATED']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
63 |
$merger = new CocoonTextRdfMerger(); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
64 |
$this->resGraph['CREATED_SOUND_TEXT'] = $merger->mergeGraph($this->inputGraphes['SOUND'], $this->inputGraphes['TEXT_CREATED']); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
65 |
|
114
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
66 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
67 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
68 |
public function tearDown() { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
69 |
parent::tearDown(); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
70 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
71 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
72 |
/** |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
73 |
* Just test that the construct and setup are ok |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
74 |
* |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
75 |
* @return void |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
76 |
*/ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
77 |
public function testInit() |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
78 |
{ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
79 |
$this->assertTrue(true); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
80 |
//echo $this->resGraph->serialise('turtle'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
81 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
82 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
83 |
/** |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
84 |
* Test merge modified merge TEXT into SOUND |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
85 |
* |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
86 |
* @return void |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
87 |
*/ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
88 |
public function testModifiedSoundText() { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
89 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
90 |
$resGraph = $this->resGraph["SOUND_TEXT"]; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
91 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
93 |
$baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
94 |
$this->assertNotNull($providedCHO); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
95 |
$this->assertNotNull($baseNode); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
96 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
97 |
$outputValuesStr = []; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
98 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
99 |
array_push($outputValuesStr, strval($outputValue)); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
100 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
101 |
$this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
102 |
foreach ($baseNode->all($this->inputGraphes['SOUND']->resource("http://purl.org/dc/terms/modified")) as $value) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
103 |
$this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
104 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
105 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
106 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
107 |
|
520
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
108 |
|
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
109 |
/** |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
110 |
* Test merge dc11:creator from SOUND |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
111 |
* |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
112 |
* @return void |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
113 |
*/ |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
114 |
public function testCreatorSoundText() { |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
115 |
|
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
116 |
$resGraph = $this->resGraph["SOUND_TEXT"]; |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
117 |
|
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
118 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
119 |
$baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
120 |
$this->assertNotNull($providedCHO); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
121 |
$this->assertNotNull($baseNode); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
122 |
|
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
123 |
$outputValuesStr = []; |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
124 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/elements/1.1/creator")) as $outputValue) { |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
125 |
array_push($outputValuesStr, strval($outputValue)); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
126 |
} |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
127 |
$this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/elements/1.1/creator"); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
128 |
$this->assertCount(2, $outputValuesStr, "we must found 2 values http://purl.org/dc/elements/1.1/creator"); |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
129 |
} |
d6adc4047ede
Add creator in participants, resolve #0026453
ymh <ymh.work@gmail.com>
parents:
504
diff
changeset
|
130 |
|
114
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
131 |
/** |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
132 |
* Test one to one mapping |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
133 |
* |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
134 |
* @return void |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
135 |
*/ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
136 |
public function testModifiedTextSound() { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
137 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
138 |
$resGraph = $this->resGraph["TEXT_SOUND"]; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
139 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
140 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
141 |
$baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
142 |
$this->assertNotNull($providedCHO); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
143 |
$this->assertNotNull($baseNode); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
144 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
145 |
$outputValuesStr = []; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
146 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
147 |
array_push($outputValuesStr, strval($outputValue)); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
148 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
149 |
$this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
150 |
foreach ($baseNode->all($this->inputGraphes['SOUND']->resource("http://purl.org/dc/terms/modified")) as $value) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
151 |
$this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
152 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
153 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
154 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
155 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
156 |
/** |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
157 |
* Test one to one mapping |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
158 |
* |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
159 |
* @return void |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
160 |
*/ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
161 |
public function testSoundNoModifiedText() { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
162 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
163 |
$resGraph = $this->resGraph["SOUND_NO_MOD_TEXT"]; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
164 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
165 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
166 |
$baseNode = $this->inputGraphes['TEXT']->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
167 |
$this->assertNotNull($providedCHO); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
168 |
$this->assertNotNull($baseNode); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
169 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
170 |
$outputValuesStr = []; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
171 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
172 |
array_push($outputValuesStr, strval($outputValue)); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
173 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
174 |
$this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
175 |
// must contain the TEXT modified value (since SOUND has none) |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
176 |
foreach ($baseNode->all($this->inputGraphes['TEXT']->resource("http://purl.org/dc/terms/modified")) as $value) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
177 |
$this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
178 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
179 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
180 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
181 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
182 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
183 |
/** |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
184 |
* Test one to one mapping |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
185 |
* |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
186 |
* @return void |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
187 |
*/ |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
188 |
public function testTextSoundNoModified() { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
189 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
190 |
$resGraph = $this->resGraph["TEXT_SOUND_NO_MOD"]; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
191 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
192 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
193 |
$baseNode = $this->inputGraphes['TEXT']->get('edm:ProvidedCHO', '^rdf:type'); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
194 |
$this->assertNotNull($providedCHO); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
195 |
$this->assertNotNull($baseNode); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
196 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
197 |
$outputValuesStr = []; |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
198 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/modified")) as $outputValue) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
199 |
array_push($outputValuesStr, strval($outputValue)); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
200 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
201 |
$this->assertNotEmpty($outputValuesStr, "we must found some values to test http://purl.org/dc/terms/modified"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
202 |
// must contain the TEXT modified value (since SOUND has none) |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
203 |
foreach ($baseNode->all($this->inputGraphes['TEXT']->resource("http://purl.org/dc/terms/modified")) as $value) { |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
204 |
$this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/modified not found in output graph"); |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
205 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
206 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
207 |
} |
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
208 |
|
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
209 |
|
116
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
210 |
public function testRightsWebResource() { |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
211 |
$properties = [ |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
212 |
"http://purl.org/dc/elements/1.1/rights", |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
213 |
'http://purl.org/dc/terms/license', |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
214 |
'http://purl.org/dc/terms/accessRights', |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
215 |
]; |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
216 |
|
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
217 |
$resGraph = $this->resGraph["SOUND_TEXT"]; |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
218 |
$webResourceList = $resGraph->all('edm:WebResource', '^rdf:type'); |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
219 |
|
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
220 |
//just check that they have all these resources. |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
221 |
//TODO: check that the same rights are kept (difficult) |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
222 |
foreach ($webResourceList as $webResource) { |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
223 |
foreach ($properties as $prop) { |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
224 |
$outputValuesStr = []; |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
225 |
foreach($webResource->all($resGraph->resource($prop)) as $outputValue) { |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
226 |
array_push($outputValuesStr, strval($outputValue)); |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
227 |
} |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
228 |
$this->assertNotEmpty($outputValuesStr, "we must found some values to test $prop"); |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
229 |
} |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
230 |
} |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
231 |
} |
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
232 |
|
117
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
233 |
public function testRightDifferent() { |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
234 |
$resGraph = $this->resGraph["SOUND_TEXT"]; |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
235 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
236 |
$aggregationRes = $resGraph->get('ore:Aggregation', '^rdf:type'); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
237 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
238 |
$license = $aggregationRes->get('<http://www.europeana.eu/schemas/edm/rights>'); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
239 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
240 |
$this->assertNotNull($license, "The licence must not be null"); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
241 |
$this->assertInstanceOf("EasyRdf\Resource", $license, "Licence must be a resource"); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
242 |
$this->assertEquals(config('corpusparole.corpus_doc_default_cc_rights'), $license->getUri(), "License must be default licence"); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
243 |
} |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
244 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
245 |
public function testRightSame() { |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
246 |
$resGraph = $this->resGraph["SOUND_NO_MOD_TEXT"]; |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
247 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
248 |
$aggregationRes = $resGraph->get('ore:Aggregation', '^rdf:type'); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
249 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
250 |
$license = $aggregationRes->get('<http://www.europeana.eu/schemas/edm/rights>'); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
251 |
|
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
252 |
$this->assertNotNull($license, "The licence must not be null"); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
253 |
$this->assertInstanceOf("EasyRdf\Resource", $license, "Licence must be a resource"); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
254 |
$this->assertEquals('http://creativecommons.org/licenses/by-nc-sa/4.0/', $license->getUri(), "License must be default licence"); |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
255 |
} |
7abc74acf392
When merging ore:aggregation, process the license correctly, if different or null, the default is use, if the same, this is the value used
ymh <ymh.work@gmail.com>
parents:
116
diff
changeset
|
256 |
|
116
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
257 |
|
504
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
258 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
259 |
* Test merge created merge TEXT with no created into SOUND with no created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
260 |
* Should have no values |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
261 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
262 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
263 |
public function testCreatedSoundNocreatedTextNoCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
264 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
265 |
$resGraph = $this->resGraph["CREATED_SOUND_NO_CREATED_TEXT_NO_CREATED"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
266 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
267 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
268 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
269 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
270 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
271 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
272 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
273 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
274 |
$this->assertEmpty($outputValuesStr, "we must found no values to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
275 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
276 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
277 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
278 |
* Test merge created merge TEXT with created into SOUND with no created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
279 |
* Should have no values |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
280 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
281 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
282 |
public function testCreatedSoundNoCreatedTextCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
283 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
284 |
$resGraph = $this->resGraph["CREATED_SOUND_NO_CREATED_TEXT"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
285 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
286 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
287 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
288 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
289 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
290 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
291 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
292 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
293 |
$this->assertEmpty($outputValuesStr, "we must found no values to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
294 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
295 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
296 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
297 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
298 |
* Test merge created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
299 |
* Merge TEXT with no created into SOUND with created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
300 |
* Should have no values |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
301 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
302 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
303 |
public function testCreatedSoundCreatedTextNoCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
304 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
305 |
$resGraph = $this->resGraph["CREATED_SOUND_TEXT_NO_CREATED"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
306 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
307 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
308 |
$baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
309 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
310 |
$this->assertNotNull($baseNode); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
311 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
312 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
313 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
314 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
315 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
316 |
$this->assertNotEmpty($outputValuesStr, "we must foundvalues to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
317 |
$this->assertCount(1, $outputValuesStr, "We should have one value"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
318 |
$baseCreated = $baseNode->get("<http://purl.org/dc/terms/created>"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
319 |
$this->assertEquals($outputValuesStr[0], strval($baseCreated), "We must same value than in sound"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
320 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
321 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
322 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
323 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
324 |
* Test merge created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
325 |
* Merge TEXT with created into SOUND with created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
326 |
* Should have no values |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
327 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
328 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
329 |
public function testCreatedSoundCreatedTextCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
330 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
331 |
$resGraph = $this->resGraph["CREATED_SOUND_TEXT"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
332 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
333 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
334 |
$baseNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
335 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
336 |
$this->assertNotNull($baseNode); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
337 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
338 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
339 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
340 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
341 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
342 |
$this->assertNotEmpty($outputValuesStr, "we must found values to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
343 |
$this->assertCount(1, $outputValuesStr, "We should have one value"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
344 |
$baseCreated = $providedCHO->get("<http://purl.org/dc/terms/created>"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
345 |
$this->assertEquals($outputValuesStr[0], strval($baseCreated), "We must same value than in sound"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
346 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
347 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
348 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
349 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
350 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
351 |
* Test merge created merge SOUND with no created into TEXT with no created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
352 |
* Should have no values |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
353 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
354 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
355 |
public function testCreatedTextNocreatedSoundNoCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
356 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
357 |
$resGraph = $this->resGraph["CREATED_TEXT_NO_CREATED_SOUND_NO_CREATED"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
358 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
359 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
360 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
361 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
362 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
363 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
364 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
365 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
366 |
$this->assertEmpty($outputValuesStr, "we must found no values to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
367 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
368 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
369 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
370 |
* Test merge created merge SOUND with created into TEXT with no created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
371 |
* Should have one value from sound |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
372 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
373 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
374 |
public function testCreatedTextNoCreatedSoundCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
375 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
376 |
$resGraph = $this->resGraph["CREATED_TEXT_NO_CREATED_SOUND"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
377 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
378 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
379 |
$soundNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
380 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
381 |
$this->assertNotNull($soundNode); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
382 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
383 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
384 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
385 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
386 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
387 |
$this->assertNotEmpty($outputValuesStr, "we must foundvalues to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
388 |
$this->assertCount(1, $outputValuesStr, "We should have one value"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
389 |
$soundCreated = $soundNode->get("<http://purl.org/dc/terms/created>"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
390 |
$this->assertEquals($outputValuesStr[0], strval($soundCreated), "We must same value than in sound"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
391 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
392 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
393 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
394 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
395 |
* Test merge created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
396 |
* Merge SOUND with no created into TEXT with created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
397 |
* Should have no values |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
398 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
399 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
400 |
public function testCreatedTextCreatedSoundNoCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
401 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
402 |
$resGraph = $this->resGraph["CREATED_TEXT_SOUND_NO_CREATED"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
403 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
404 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
405 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
406 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
407 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
408 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
409 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
410 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
411 |
$this->assertEmpty($outputValuesStr, "we must found no values to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
412 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
413 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
414 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
415 |
/** |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
416 |
* Test merge created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
417 |
* Merge SOUND with created into TEXT with created |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
418 |
* Should have one value |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
419 |
* @return void |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
420 |
*/ |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
421 |
public function testCreatedTextCreatedSoundCreated() { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
422 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
423 |
$resGraph = $this->resGraph["CREATED_TEXT_SOUND"]; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
424 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
425 |
$providedCHO = $resGraph->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
426 |
$soundNode = $this->inputGraphes['SOUND']->get('edm:ProvidedCHO', '^rdf:type'); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
427 |
$this->assertNotNull($providedCHO); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
428 |
$this->assertNotNull($soundNode); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
429 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
430 |
$outputValuesStr = []; |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
431 |
foreach($providedCHO->all($resGraph->resource("http://purl.org/dc/terms/created")) as $outputValue) { |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
432 |
array_push($outputValuesStr, strval($outputValue)); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
433 |
} |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
434 |
$this->assertNotEmpty($outputValuesStr, "we must found values to test http://purl.org/dc/terms/created"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
435 |
$this->assertCount(1, $outputValuesStr, "We should have one value"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
436 |
$soundCreated = $soundNode->get("<http://purl.org/dc/terms/created>"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
437 |
$this->assertEquals($outputValuesStr[0], strval($soundCreated), "We must same value than in sound"); |
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
438 |
|
4ab820b387da
Correct the handling of created date. Should correct #0025744
ymh <ymh.work@gmail.com>
parents:
152
diff
changeset
|
439 |
} |
116
e60c55988ed4
put right, access and licence info on webresource
ymh <ymh.work@gmail.com>
parents:
115
diff
changeset
|
440 |
|
114
8af5ed0521a2
Correct modified value for SOUND when merging. This comes not from TEXT
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
441 |
} |