mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 08:17:22 +01:00
Adds nested Higher Order Expectations.
This commit is contained in:
@ -4,8 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Pest\Concerns;
|
||||
|
||||
use BadMethodCallException;
|
||||
use Closure;
|
||||
use Pest\HigherOrderExpectation;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -43,7 +43,7 @@ trait Extendable
|
||||
public function __call(string $method, array $parameters)
|
||||
{
|
||||
if (!static::hasExtend($method)) {
|
||||
return new HigherOrderExpectation($this, $method, $parameters);
|
||||
throw new BadMethodCallException("$method is not a callable method name.");
|
||||
}
|
||||
|
||||
/** @var Closure $extend */
|
||||
|
||||
Reference in New Issue
Block a user