Code Duplication    Length = 7-7 lines in 2 locations

src/Context/WebApiContext.php 2 locations

@@ 169-175 (lines=7) @@
166
     *
167
     * @Then /^(?:the )?response should contain "([^"]*)"$/
168
     */
169
    public function theResponseShouldContain($text): void
170
    {
171
        $expectedRegexp = '/'.preg_quote($text).'/i';
172
        $bodyResponse = (string) $this->getResponse()->getBody();
173
174
        Assert::assertRegExp($expectedRegexp, $bodyResponse);
175
    }
176
177
    /**
178
     * Checks that response body doesn't contains specific text.
@@ 184-190 (lines=7) @@
181
     *
182
     * @Then /^(?:the )?response should not contain "([^"]*)"$/
183
     */
184
    public function theResponseShouldNotContain($text): void
185
    {
186
        $expectedRegexp = '/'.preg_quote($text).'/';
187
        $bodyResponse = (string) $this->getResponse()->getBody();
188
189
        Assert::assertNotRegExp($expectedRegexp, $bodyResponse);
190
    }
191
192
    /**
193
     * Checks that response body contains JSON from PyString.