['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:----KPs4OPfb3wVkGPujN1QcCoyAwjRH3Ga7opuzSelM4gsW0OAzbwEtLyGXP6R4DOW5GyCSGSEuYtuXdPL8wNoR/lZD5sMvLB7Yc8HES9OLldJo9Tp3VZXHtWnXq2ik5aF9OI4OwoaFvh2RV0SJWk10X8xz0EaXJhp4Q2DkRUrQiNLsDVxDd/Jx/hAfgDAKFXXH9HErLGTXDaS8ub4n2CRHnceFhHDQNghGige9PhrBzZQsVYWZhv8w2En1LTUulGyyhO8dJV5oKevbd/5qB34EdX0qk+IBkjIa2qn5/WO4xM0ooeh8pJ7l3vN7uaqQ4WIbXxeTc4JU4jRWioQWPlz2/GqIwNdf5eu+CdzAHnRqeDbwGPZQ2lzxXseo6f8673TvjiW25ZlZmdofjfPY2fxV8WgVlx2WMnbiTggZ16umsGGfqh6zKxpCQxzWa/e8VO1M6DtrrAr/OIZKCckMU0WlRoTBqrRz8ybrKvnCBACK4cLZFEHjy5R/hbL6IxR0+Gxrp5c1Rjr02MjVkbAdRLV0sauw3AOHmh5+VF0WjyYr84gXcvkObRvHXUzEIH/FJ45kgRTNd4a4yUqBJY2RKp4pTUkcCkVMKyjk3nbcM8FZlxwO0Nf7c8eeIiSTxsmU6MT6YohUuZVVmnKDOLNPSmUP27dHQfhuQMjiFtHXBQk3i0Q=----ATTACHMENT:----OTE1NjcwNzU2MTM5NDk5OCAxMDgyMTE2MTUwNTI3ODEzIDU3MjU0NjcxNDQ3MDQ3NjE=