/** * Generate and renders the JSON schema for the node types for VIE. * Schema format example: http://schema.rdfs.org/all.json * * @return string */ public function vieSchemaAction() { $this->response->setHeader('Content-Type', 'application/json'); return json_encode($this->vieSchemaBuilder->generateVieSchema()); }
/** * @test */ public function generatedVieSchemaMatchesExpectedOutput() { $schema = $this->vieSchemaBuilder->generateVieSchema(); $fixtureSchema = file_get_contents(__DIR__ . '/Fixtures/VieSchema.json'); $this->assertEquals(json_decode($fixtureSchema), json_decode(json_encode($schema))); }