Code Duplication    Length = 7-7 lines in 2 locations

src/Xml/XmlContext.php 2 locations

@@ 176-182 (lines=7) @@
173
     *
174
     * @Then /^the XML attribute "(?P<attribute>[^"]*)" on element "(?P<element>(?:[^"]|\\")*)" should be equal to "(?P<text>[^"]*)"$/
175
     */
176
    public function theXmlAttributeShouldBeEqualTo($attribute, $element, $text)
177
    {
178
        $actual = $this->theXmlAttributeShouldExist($attribute, $element);
179
        if ($text != $actual) {
180
            throw new \Exception(sprintf("The attribute value is `%s`", $actual));
181
        }
182
    }
183
184
    /**
185
     * Checks that the XML attribute on the specified element is not equal to the given value
@@ 189-195 (lines=7) @@
186
     *
187
     * @Then /^the XML attribute "(?P<attribute>[^"]*)" on element "(?P<element>(?:[^"]|\\")*)" should not be equal to "(?P<text>[^"]*)"$/
188
     */
189
    public function theXmlAttributeShouldNotBeEqualTo($attribute, $element, $text)
190
    {
191
        $actual = $this->theXmlAttributeShouldExist($attribute, $element);
192
        if ($text === $actual) {
193
            throw new \Exception(sprintf("The attribute value is `%s`", $actual));
194
        }
195
    }
196
197
    /**
198
     * Checks that the given XML element has N child element(s)