You are here

protected function EasyRdfConverterTest::testSchemaTypes in Schema.org configuration tool (RDF UI) 8

Tests that Schema.org types are correctly loaded.

File

src/Tests/EasyRdfConverterTest.php, line 34

Class

EasyRdfConverterTest
Tests the Easy Rdf Converter Class & SchemaOrgConverter class.

Namespace

Drupal\rdfui\Tests

Code

protected function testSchemaTypes() {
  $types = $this->graph
    ->getListTypes();
  $this
    ->assertTrue(in_array("Person", $types), 'Schema.Org types loaded correctly');
  $this
    ->assertTrue(in_array("Event", $types), 'Schema.Org types loaded correctly');
  $this
    ->assertTrue(in_array("Recipe", $types), 'Schema.Org types loaded correctly');
  $this
    ->assertFalse(in_array("name", $types), 'Properties are not in the list of Types');
}