server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php
changeset 111 af85c436048f
parent 19 eadaf0b8f02e
child 112 7a542145832c
equal deleted inserted replaced
110:8e5fcebb9018 111:af85c436048f
   156       *
   156       *
   157       * @return void
   157       * @return void
   158       */
   158       */
   159     public function testWebResources() {
   159     public function testWebResources() {
   160 
   160 
   161         $resources = $this->resGraphes['BASE']->allOfType('edm:WebResources');
   161         $resources = $this->resGraphes['BASE']->allOfType('edm:WebResource');
   162 
   162 
   163         $this->assertCount(2, $resources, "Must found three webresources");
   163         $this->assertCount(2, $resources, "Must found three webresource");
   164 
   164 
   165         $aggregation = $this->resGraphes['BASE']->resource(CocoonTextRdfMapperTest::TEST_GRAPH_URI);
   165         $aggregation = $this->resGraphes['BASE']->resource(CocoonTextRdfMapperTest::TEST_GRAPH_URI);
   166 
   166 
   167         foreach ($resources as $wres) {
   167         foreach ($resources as $wres) {
   168             $mimetypes = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/format'));
   168             $mimetypes = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/format'));
   178       *
   178       *
   179       * @return void
   179       * @return void
   180       */
   180       */
   181     public function testWebResourcesDate() {
   181     public function testWebResourcesDate() {
   182 
   182 
   183         $resources = $this->resGraphes['BASE']->allOfType('edm:WebResources');
   183         $resources = $this->resGraphes['BASE']->allOfType('edm:WebResource');
   184 
   184 
   185         foreach ($resources as $wres) {
   185         foreach ($resources as $wres) {
   186             $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/available"),"web resource must not have http://purl.org/dc/terms/available");
   186             $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/available"),"web resource must not have http://purl.org/dc/terms/available");
   187             $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/modified"),"web resource must not have http://purl.org/dc/terms/modified");
   187             $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/modified"),"web resource must not have http://purl.org/dc/terms/modified");
   188             $this->assertTrue($wres->hasProperty("http://purl.org/dc/terms/issued"), "Must have http://purl.org/dc/terms/issued");
   188             $this->assertTrue($wres->hasProperty("http://purl.org/dc/terms/issued"), "Must have http://purl.org/dc/terms/issued");