implemented pipe closure with $next as the last parameter

This commit is contained in:
Fabio Ivona
2021-10-10 00:16:21 +02:00
parent c3a445534b
commit bc4e5b9b4e
5 changed files with 202 additions and 130 deletions

View File

@ -0,0 +1,18 @@
<?php
namespace Pest\Exceptions;
use Exception;
class PipeException extends Exception
{
public static function optionalParmetersShouldBecomeRequired(string $expectationName): PipeException
{
return new self("You're attempting to pipe '$expectationName', but in pipelines optional parmeters should be declared as required)");
}
public static function expectationNotFound($expectationName): PipeException
{
return new self("Expectation $expectationName was not found in Pest");
}
}