Goetas\Xsd\XsdToPhp\Tests\Converter\JMS\Xsd2PhpGroupTest::testArray PHP Method

testArray() public method

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->assertEquals(array('Example\\ComplexType1Type' => array('properties' => array('strings' => array('expose' => true, 'access_type' => 'public_method', 'serialized_name' => 'strings', 'xml_element' => array('namespace' => 'http://www.example.com'), 'accessor' => array('getter' => 'getStrings', 'setter' => 'setStrings'), 'type' => 'array<string>', 'xml_list' => array('inline' => false, 'entry_name' => 'string', 'namespace' => 'http://www.example.com', 'skip_when_empty' => false))))), $classes['Example\\ComplexType1Type']);
    }