mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
fix: removes both toHaveMethod and toHaveMethods
This commit is contained in:
@ -344,36 +344,6 @@ final class Expectation
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the value has the method $name.
|
||||
*
|
||||
* @return self<TValue>
|
||||
*/
|
||||
public function toHaveMethod(string $name, string $message = ''): self
|
||||
{
|
||||
$this->toBeObject();
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
Assert::assertTrue(method_exists($this->value, $name), $message);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the value has the provided methods $names.
|
||||
*
|
||||
* @param iterable<array-key, string> $names
|
||||
* @return self<TValue>
|
||||
*/
|
||||
public function toHaveMethods(iterable $names, string $message = ''): self
|
||||
{
|
||||
foreach ($names as $name) {
|
||||
$this->toHaveMethod($name, message: $message);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that two variables have the same value.
|
||||
*
|
||||
|
||||
@ -49,16 +49,6 @@ final class HigherOrderCallables
|
||||
return $this->expect($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the given callable after the test has executed the setup method.
|
||||
*
|
||||
* @deprecated This method is deprecated. Please use `defer` instead.
|
||||
*/
|
||||
public function tap(callable $callable): object
|
||||
{
|
||||
return $this->defer($callable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the given callable after the test has executed the setup method.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user