Example #1
0
 public function testSpecificXinclude()
 {
     $type_schema_path = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'extensive_type_schema_include.xml';
     $parser = new EntityTypeSchemaXmlParser();
     $type_schema = $parser->parse($type_schema_path);
     $this->assertInstanceOf('\\Trellis\\CodeGen\\Schema\\EntityTypeSchema', $type_schema);
 }
 public function testGetUsedReferenceDefinitions()
 {
     $schema_path = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'complex_schema.xml';
     $schema_parser = new EntityTypeSchemaXmlParser();
     $type_schema = $schema_parser->parse($schema_path);
     $embed_defs = $type_schema->getUsedReferenceDefinitions($type_schema->getEntityTypeDefinition());
     $this->assertEquals(2, $embed_defs->getSize());
 }