add custom message to failed expectations

This commit is contained in:
Fabio Ivona
2022-09-19 09:03:27 +02:00
parent c5cb1fc325
commit 8a3caa5e7f
55 changed files with 424 additions and 143 deletions

View File

@ -21,7 +21,7 @@ final class ExpectationPipeline
/**
* The list of passables.
*
* @var array<int, mixed>
* @var array<array-key, mixed>
*/
private array $passables;
@ -46,7 +46,7 @@ final class ExpectationPipeline
*/
public function send(mixed ...$passables): self
{
$this->passables = array_values($passables);
$this->passables = $passables;
return $this;
}
@ -72,7 +72,7 @@ final class ExpectationPipeline
array_reverse($this->pipes),
$this->carry(),
function (): void {
($this->closure)(...$this->passables);
call_user_func_array($this->closure, $this->passables);
}
);

View File

@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Pest\Support;
final class NullValue
{
}