We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getValue()
When I use Higher Order Testing like this:
it('can be optional') ->expect(fn() => $this->param->optional('foo')) ->isRequired()->toBeFalse() ->getValue()->toBe('foo');
I get an error: ReflectionException: Call to undefined method Namespace\MyClass::toBe()
ReflectionException: Call to undefined method Namespace\MyClass::toBe()
If I switch the order of calls to getValue() and isRequired():
isRequired()
it('can be optional') ->expect(fn() => $this->param->optional('foo')) ->getValue()->toBe('foo') ->isRequired()->toBeFalse();
the test passes as expected.
The class tested actually has a method named getValue.
getValue
See sample repository.
https://github.com/Arcesilas/pest-bug
3.4.0
8.3.12
Linux
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What Happened
When I use Higher Order Testing like this:
I get an error:
ReflectionException: Call to undefined method Namespace\MyClass::toBe()
If I switch the order of calls to
getValue()
andisRequired()
:the test passes as expected.
The class tested actually has a method named
getValue
.How to Reproduce
See sample repository.
Sample Repository
https://github.com/Arcesilas/pest-bug
Pest Version
3.4.0
PHP Version
8.3.12
Operation System
Linux
Notes
No response
The text was updated successfully, but these errors were encountered: