server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php
changeset 115 34ffc04cef62
parent 114 8af5ed0521a2
child 116 e60c55988ed4
equal deleted inserted replaced
114:8af5ed0521a2 115:34ffc04cef62
   247 
   247 
   248          $this->assertCount(1, $resources, "Must found only one resources of type edm:aggregatedCHO");
   248          $this->assertCount(1, $resources, "Must found only one resources of type edm:aggregatedCHO");
   249          $this->assertEquals(CocoonSoundRdfMapperTest::TEST_CHO_URI,$resources[0]);
   249          $this->assertEquals(CocoonSoundRdfMapperTest::TEST_CHO_URI,$resources[0]);
   250      }
   250      }
   251 
   251 
       
   252      /**
       
   253       * Test providedCHO identifier.
       
   254       *
       
   255       * @return void
       
   256       */
       
   257      public function testProvidedChoId() {
       
   258          $resources = $this->resGraphes['BASE']->allOfType('edm:ProvidedCHO');
       
   259 
       
   260          $this->assertCount(1, $resources, "Must found only one resources of type edm:ProvidedCHO");
       
   261          $providedCHO = $resources[0];
       
   262 
       
   263          $identifier = $providedCHO->getLiteral('<http://purl.org/dc/terms/identifier>');
       
   264 
       
   265          $this->assertInstanceOf('EasyRdf\Literal', $identifier, "identifier value must be a literal");
       
   266          $this->assertEquals(CocoonSoundRdfMapperTest::TEST_INPUT_ID, $identifier->getValue(), "Value must be equals to ".CocoonSoundRdfMapperTest::TEST_INPUT_ID);
       
   267 
       
   268      }
       
   269 
       
   270 
   252     /**
   271     /**
   253      * Test one to one mapping
   272      * Test one to one mapping
   254      *
   273      *
   255      * @return void
   274      * @return void
   256      */
   275      */