Goetas\Xsd\XsdToPhp\Tests\Converter\PHP\Xsd2PhpGroupTest::testMaxOccurs PHP Method

testMaxOccurs() public method

public testMaxOccurs ( $max, $isArray )
    public function testMaxOccurs($max, $isArray)
    {
        $content = '
             <xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
                <xs:complexType name="complexType-1">
                     <xs:sequence>
                            <xs:element ' . ($max !== null ? ' maxOccurs="' . $max . '"' : "") . ' name="complexType-1-el-1" type="xs:string"/>
                     </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']);
    }