class PhptAssertionFailedError
@psalm-immutable
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Framework\Exception extends \RuntimeException implements \PHPUnit\Exception
- class \PHPUnit\Framework\AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing
- class \PHPUnit\Framework\PhptAssertionFailedError extends \PHPUnit\Framework\AssertionFailedError
- class \PHPUnit\Framework\AssertionFailedError extends \PHPUnit\Framework\Exception implements \PHPUnit\Framework\SelfDescribing
Expanded class hierarchy of PhptAssertionFailedError
3 files declare their use of PhptAssertionFailedError
- Filter.php in vendor/
phpunit/ phpunit/ src/ Util/ Filter.php - PhptTestCase.php in vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php - ThrowableToStringMapper.php in vendor/
phpunit/ phpunit/ src/ Util/ ThrowableToStringMapper.php
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ Exception/ PhptAssertionFailedError.php, line 19
Namespace
PHPUnit\FrameworkView source
final class PhptAssertionFailedError extends AssertionFailedError {
private readonly string $syntheticFile;
private readonly int $syntheticLine;
private readonly array $syntheticTrace;
private readonly string $diff;
public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) {
parent::__construct($message, $code);
$this->syntheticFile = $file;
$this->syntheticLine = $line;
$this->syntheticTrace = $trace;
$this->diff = $diff;
}
public function syntheticFile() : string {
return $this->syntheticFile;
}
public function syntheticLine() : int {
return $this->syntheticLine;
}
public function syntheticTrace() : array {
return $this->syntheticTrace;
}
public function diff() : string {
return $this->diff;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
AssertionFailedError::toString | public | function | Wrapper for getMessage() which is declared as final. | Overrides SelfDescribing::toString |
Exception::$serializableTrace | protected | property | ||
Exception::getSerializableTrace | public | function | Returns the serializable trace (without 'args'). | |
Exception::__sleep | public | function | ||
PhptAssertionFailedError::$diff | private | property | ||
PhptAssertionFailedError::$syntheticFile | private | property | ||
PhptAssertionFailedError::$syntheticLine | private | property | ||
PhptAssertionFailedError::$syntheticTrace | private | property | ||
PhptAssertionFailedError::diff | public | function | ||
PhptAssertionFailedError::syntheticFile | public | function | ||
PhptAssertionFailedError::syntheticLine | public | function | ||
PhptAssertionFailedError::syntheticTrace | public | function | ||
PhptAssertionFailedError::__construct | public | function | Overrides Exception::__construct |