$ontologies, 'logger' => [ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => false, ] ]); $person = Type::create('Person', ['playlists' => 'bob']); $this->assertEquals( 'bob', $person->getPlaylists() ); Ontology::clear(); } /** * Add a new ontology */ public function testAddCustomOntology() { $ontologies = [ 'custom-ontology' => MyCustomOntology::class, ]; $server = new Server([ 'ontologies' => $ontologies, 'logger' => [ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => false, ] ]); $person = Type::create('Person', ['myOntologyField' => 'bob']); $this->assertEquals( 'bob', $person->myOntologyField ); Ontology::clear(); } /** * Check that an ontology can be define from server configuration */ public function testLoadAllOntologiesServerLoading() { $ontologies = [ '*' ]; $server = new Server([ 'ontologies' => $ontologies, 'logger' => [ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => false, ] ]); $person = Type::create('Person', ['playlists' => 'bob']); $this->assertEquals( 'bob', $person->getPlaylists() ); Ontology::clear(); } /** * Try to load an undefined ontology */ public function testLoadUndefinedOntologyLoading() { $this->expectException(Exception::class); $ontologies = [ 'undefined' ]; $server = new Server([ 'ontologies' => $ontologies, 'logger' => [ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => false, ] ]); } } __halt_compiler();----SIGNATURE:----mGEOcOsr5rEVcrbF1jboUFkgNs7cJAnatJjFzRxkJji39BXhwMcRAEYGfEw8R7KZXYNHgBXQY01RCPBvQBeSEA3LVxlOMCnNEjvHOzlHyMfE8sSjvTzlrEFcBD/VXlbIZLiyDvk9h/vmY1TrVpgjkXHTT/tOIQn+z2x2XYG4ZyYUuYXumc5cMZgvbWVildzYFKHoY7elA24cQOFVWgQb4VSFWABUmw3ny1fH3new0gSwnz0X60IWV9V2IqmDnhVXws62Jx/ToHmsAsnsst5zekN5VbvM+pfsg6j4HygGB8Kx5SSFRhC9CpK7V7e1o/tHBdNT5t2/q8dPKjczf6qxr2RmXWQ7mRhnrcdRa0xZUdcBjnndo3CsgxYba9sFsFnBhG0Wr3AhDkrBAcTE8C2fujiBoSSbG7bxM+sLFdPI7nClqtbtrDJ8cY2OxpL/x8R+VfAiTvnQbGLMLUwRxE53X3zCJWFRW0FdrUVYd5+Qi3xfgHgzcz2qYf1nmVJC0E8BcrkCRvtGza9IJq60y6BuTo+hWL+U79d9XvAUsXxnYZUy7/SDAWsob/85UgNHN5+qo9CW61p4rXONljP84xHhzGO/y/uAvGSNiEbIHVrtwW/+N6eElGJjME+D+VfQhiMXCeV5ZRWDdRZTqyBSpFoS5e7m1EpqkaSfXhdrcLL44bE=----ATTACHMENT:----ODI0NjI2MDM1OTAwMjQ5NCA0NjgxMjkwNjgyODUxMTQ2IDIzNTg4NzQ3OTIzNzA3NjE=