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

Breadcrumb

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

function Constraint::failureDescription

Returns the description of the failure.

The beginning of failure messages is "Failed asserting that" in most cases. This method should return the second part of that sentence.

To provide additional failure information additionalFailureDescription can be used.

3 calls to Constraint::failureDescription()
Constraint::fail in vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php
Throws an exception for the given compared value and test description.
IsIdentical::failureDescription in vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php
Returns the description of the failure.
IsIdentical::failureDescription in vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php
Returns the description of the failure.
51 methods override Constraint::failureDescription()
ArrayHasKey::failureDescription in vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php
Returns the description of the failure.
BrowserCookieValueSame::failureDescription in vendor/symfony/browser-kit/Test/Constraint/BrowserCookieValueSame.php
BrowserHasCookie::failureDescription in vendor/symfony/browser-kit/Test/Constraint/BrowserHasCookie.php
CommandIsSuccessful::failureDescription in vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php
Returns the description of the failure.
Count::failureDescription in vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php
Returns the description of the failure.

... See full list

File

vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php, line 132

Class

Constraint
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Framework\Constraint

Code

protected function failureDescription(mixed $other) : string {
    return Exporter::export($other, true) . ' ' . $this->toString(true);
}

API Navigation

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