['myOntologyField'], ]; } class OntologyTest extends TestCase { /** * Add a new ontology */ public function testAddNewOne() { Ontology::clear(); // Add and load this dialect Ontology::add('custom-ontology', MyCustomOntology::class); // Set this dialect property for one type $type = Type::create('Person', ['myOntologyField' => 1]); $this->assertEquals( 1, $type->myOntologyField ); Ontology::clear(); } /** * Should throw an Exception when ontology name is not allowed */ public function testNotAllowedOntologyName() { $this->expectException(Exception::class); Ontology::clear(); $ontology = 'MyClass'; // Add and load this dialect Ontology::add('*', $ontology); } /** * Should throw an Exception when ontology class does not exist */ public function testNotExistingOntology() { $this->expectException(Exception::class); Ontology::clear(); $ontology = 'MyClass'; // Add and load this dialect Ontology::add('cus-ontology', $ontology); } /** * Should throw an Exception when ontology cdoes not implement * its interface */ public function testNotWellDefinedOntology() { $this->expectException(Exception::class); Ontology::clear(); // Add and load this dialect Ontology::add('cus-ontology', MyNotwellDefinedOntology::class); } } __halt_compiler();----SIGNATURE:----SSHsNr1JXfMC7Tzo9vBUgxzT12rusCRwbUdvu1Vh1jX0IHrQTIgzWoW3pQCKOVyMD7Q+jnjX6sY0JuLtmQh/vv2vkRzEdFrQH5f2IBwuW9rT78UzvGxLP3dMfv3MmNUtrmNJAk+vGs6IgoUBGsbnsBRUOF4rhJc0+7ZitrPyDhZ43TdyCUWs3FgJiS6H7RpWIWYvvkM2gUR9wD2jmqFXM6fxYY9HSoHVPBDe6OhxjmxchaF0RnOXrXAFUOu8OVUzHo/H9iH/7KiNqMt+MPsn2iPbszHvDMmlwbL4QJFyVNHsHOlD78t9zf5l5anRquq1eERvKWeqEfvXtxUFVL6efIz6d5gq0L/3pRQkYRDVTf9fEnSEr57zyJPYnjoXUVRucJUpCN1FeOMLOvFH03eIoexY+aW+FGDUfe/BG2bwrFK1TUCOKyYwD/wSDz9q+6tWOxhiHh+bvLrYUBwq0wYFZOZNCBYUiRJc6WRygMtOFqmWVjcH6N0p443Eh3FRhIpo2hciWekPBPgm3mhfHAdb9PsgCqQPJLUFRlyEjg66b5i/G8Ca6I2s+JWAngVCnDU2iC88N0ylT76hXqnuwpL8eIkgTmhqSj3aARcKoO2Mb1XFATDBuv1Aps4Ht9EeSln4xu5CGsbid7IBKUzdhxmdI/zVzMkCo6nZO5DSGCiKkU4=----ATTACHMENT:----NTY0Mjc0MzMwMDU4MjMzMyAxMDEwNDMyOTkxNTU3NzE4IDc5OTY3Mjk0MzM0MDE5MTQ=