mirror of
https://github.com/pestphp/pest.git
synced 2026-03-08 00:37:22 +01:00
Merge branch 'pipes-and-interceptors' into next-1
# Conflicts: # src/Concerns/Extendable.php # src/CoreExpectation.php # src/Expectation.php # src/Support/ExpectationPipeline.php # src/Support/Extendable.php
This commit is contained in:
23
src/Exceptions/InvalidExpectationValue.php
Normal file
23
src/Exceptions/InvalidExpectationValue.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class InvalidExpectationValue extends InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* @return never
|
||||
*
|
||||
* @throws self
|
||||
*/
|
||||
public static function expected(string $type): void
|
||||
{
|
||||
throw new self(sprintf('Invalid expectation value type. Expected [%s].', $type));
|
||||
}
|
||||
}
|
||||
15
src/Exceptions/PipeException.php
Normal file
15
src/Exceptions/PipeException.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
final class PipeException extends Exception
|
||||
{
|
||||
public static function expectationNotFound(string $expectationName): PipeException
|
||||
{
|
||||
return new self("Expectation $expectationName was not found in Pest");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user