Code Duplication    Length = 16-16 lines in 2 locations

tests/TypesTest.php 2 locations

@@ 126-141 (lines=16) @@
123
    /**
124
     * @dataProvider getMaxOccurences
125
     */
126
    public function testElementMaxOccurences($xml, $expected)
127
    {
128
        $schema = $this->reader->readString(
129
            '
130
            <xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
131
                <xs:complexType name="complexType">
132
                    <xs:sequence>
133
                        <xs:element name="el1" maxOccurs="' . $xml . '" type="xs:string"></xs:element>
134
                    </xs:sequence>
135
                </xs:complexType>
136
            </xs:schema>');
137
138
        $complex = $schema->findType('complexType', 'http://www.example.com');
139
        $elements = $complex->getElements();
140
        $this->assertEquals($expected, $elements[0]->getMax());
141
    }
142
143
    public function getMinOccurences()
144
    {
@@ 154-169 (lines=16) @@
151
    /**
152
     * @dataProvider getMinOccurences
153
     */
154
    public function testElementMinOccurences($xml, $expected)
155
    {
156
        $schema = $this->reader->readString(
157
            '
158
            <xs:schema targetNamespace="http://www.example.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
159
                <xs:complexType name="complexType">
160
                    <xs:sequence>
161
                        <xs:element name="el1" minOccurs="' . $xml . '" type="xs:string"></xs:element>
162
                    </xs:sequence>
163
                </xs:complexType>
164
            </xs:schema>');
165
166
        $complex = $schema->findType('complexType', 'http://www.example.com');
167
        $elements = $complex->getElements();
168
        $this->assertEquals($expected, $elements[0]->getMin());
169
    }
170
171
    public function testComplex()
172
    {