Goetas\Xsd\XsdToPhp\Tests\Converter\PHP\Xsd2PhpGroupTest::testArray PHP Méthode

testArray() public méthode

public testArray ( )
    public function testArray()
    {
        $content = '
             <xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema"  xmlns:ex="http://www.example.com">
                   <xs:complexType name="complexType-1">
                        <xs:sequence>
                            <xs:element name="strings" type="ex:ArrayOfStrings"></xs:element>
                        </xs:sequence>
                    </xs:complexType>

                    <xs:complexType name="ArrayOfStrings">
                        <xs:sequence>
                            <xs:element name="string" type="xs:string" maxOccurs="unbounded" minOccurs="1"></xs:element>
                        </xs:sequence>
                    </xs:complexType>
            </xs:schema>
            ';
        $classes = $this->getClasses($content);
        $this->assertCount(1, $classes);
        $this->assertInstanceOf('Goetas\\Xsd\\XsdToPhp\\Php\\Structure\\PHPClass', $complexType1 = $classes['Example\\ComplexType1Type']);
        $property = $complexType1->getProperty('strings');
        $this->assertInstanceOf('Goetas\\Xsd\\XsdToPhp\\Php\\Structure\\PHPClassOf', $typeOf = $property->getType());
        $this->assertInstanceOf('Goetas\\Xsd\\XsdToPhp\\Php\\Structure\\PHPProperty', $typeProp = $typeOf->getArg());
        $this->assertInstanceOf('Goetas\\Xsd\\XsdToPhp\\Php\\Structure\\PHPClass', $typePropType = $typeProp->getType());
        $this->assertEquals('', $typePropType->getNamespace());
        $this->assertEquals('string', $typePropType->getName());
    }