Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExpectationException.php

function ExpectationException::getResponseInfo

Returns response information string.

Return value

string

1 call to ExpectationException::getResponseInfo()
ExpectationException::__toString in vendor/behat/mink/src/Exception/ExpectationException.php
Returns exception message with additional context info.

File

vendor/behat/mink/src/Exception/ExpectationException.php, line 167

Class

ExpectationException
Exception thrown for failed expectations.

Namespace

Behat\Mink\Exception

Code

protected function getResponseInfo() {
    $driver = basename(str_replace('\\', '/', get_class($this->driver)));
    $info = '+--[ ';
    try {
        $info .= 'HTTP/1.1 ' . $this->driver
            ->getStatusCode() . ' | ';
    } catch (UnsupportedDriverActionException $e) {
        // Ignore the status code when not supported
    }
    $info .= $this->driver
        ->getCurrentUrl() . ' | ' . $driver . " ]\n|\n";
    return $info;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal