public function setUp()
 {
     $graph = new \EasyRdf_Graph();
     $myEnum = new \EasyRdf_Resource('http://schema.org/MyEnum', $graph);
     $myEnum->add('rdfs:subClassOf', ['type' => 'uri', 'value' => TypesGenerator::SCHEMA_ORG_ENUMERATION]);
     $this->generator = new ApiPlatformCoreAnnotationGenerator(new NullLogger(), [], [], [], ['Res' => ['resource' => new \EasyRdf_Resource('http://schema.org/Res', $graph), 'fields' => ['prop' => ['isCustom' => false], 'customProp' => ['isCustom' => true]]], 'MyEnum' => ['resource' => $myEnum]]);
 }
Ejemplo n.º 2
0
 public function testIsPrimaryTopicOf()
 {
     $doc = new EasyRdf_Resource('http://example.com/foaf.rdf');
     $person = new EasyRdf_Resource('http://example.com/foaf.rdf#me');
     $person->add('foaf:isPrimaryTopicOf', $doc);
     $this->assertEquals('http://example.com/foaf.rdf#me', $doc->primaryTopic()->getUri());
 }