src/Context/ApiContext.php
public function assertResponseReasonPhraseMatches($pattern) {
        $this->requireResponse();

        try {
            Assertion::regex(
                $actual = $this->response->getReasonPhrase(),
                $pattern,
                sprintf(
                    'Expected the response reason phrase to match the regular expression "%s", got "%s".',
                    $pattern,
                    $actual
                ));
        } catch (AssertionFailure $e) {
            throw new AssertionFailedException($e->getMessage());
        }
    }
public function assertResponseReasonPhraseMatches($pattern) {
        $this->requireResponse();

        try {
            Assertion::regex(
                $actual = $this->response->getReasonPhrase(),
                $pattern,
                sprintf(
                    'Expected the response reason phrase to match the regular expression "%s", got "%s".',
                    $pattern,
                    $actual
                ));
        } catch (AssertionFailure $e) {
            throw new AssertionFailedException($e->getMessage());
        }
    }
public function assertResponseReasonPhraseMatches ( $ pattern ) { $ this -> requireResponse ( ) ; try { Assertion :: regex ( $ actual = $ this -> response -> getReasonPhrase ( ) , $ pattern , sprintf ( 'Expected the response reason phrase to match the regular expression "%s", got "%s".' , $ pattern , $ actual ) ) ; } catch ( AssertionFailure $ e ) { throw new AssertionFailedException ( $ e -> getMessage ( ) ) ; } }
Assert that the HTTP response reason phrase matches a regular expression

@param string $pattern Regular expression pattern
@throws AssertionFailedException
@return void

@Then the response reason phrase matches :expression
Assert that the HTTP response reason phrase matches a regular expression