$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:----nWBm214OcAubarwVjjSHzycNcOnrAx8ZjAEBX/fRis8h+QmOyzzuMHM9yAAVz2ehYiC78zR1n4CS3C62mcKBuEF4dmk2YYbo0w/XSUgmfvKURnmczIAbe1n9+AUoWR+fgmeFqIU5dXX6B6HVhDztmS/54OQDHepwt+qtQ3dcgqpD340T+m3V0Qm7QPUUkDoY4tajldvJOjQ7osX0EKT8nXTXRGvpneut4sRECklllAGX/9MFoUWzGayzfSwkGSulfJAh/PlJkgufhsZldlYz9KhNtL+5NRl3UkZr4I2fsvA5KMoxmbxG2RpumDkBbiknaXsqjRJL/suGPteaiYIcVOdPmmAUhwbrmy8yvs3JyIJfU9AQOuwE+DB7nI2h7BZs89JAEmHdOeXi9JRYRFwgRxIn+a8qjZRQOViPJ26U5zD5HEhUfxgTh9jsZB3pbYGzlu/hajf1J/AK6dutzu93zU+GK4F3QjCaMJRJKUXn2FgjM54KJodsKNx0gmT0TuNWThIsZuT1XgL0LuKbBw5AZ3XHus2mDTg+h1zxPn5WHepG6xBeSVU1NnusXBJAaEt4q3Ufac5dIanHcnTRSu3IKdpRgneiKipfBARBa5KgAdwsQbADgbN+nJuVFVKRc1yFXseEtfs51jRkPpuNXIPhCLUePN9IKJXxJ19ndtpz0ik=----ATTACHMENT:----NDIxMjk5MTAxNzg0MTE1NyA2NzYzNDUzODUzNDk4NjkxIDM3OTA4MDY4NDMwMTAwOTg=