Skip to content
New issue

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

[Bug]: Expectation chain for property doesn't work if its name is value. #1339

Open
ravibpatel opened this issue Jan 12, 2025 · 0 comments
Open
Labels

Comments

@ravibpatel
Copy link

ravibpatel commented Jan 12, 2025

What Happened

It should work like with other field names, but it can't cause Expectation has public value property. I have to do the following.

expect($setting->value)
    ->toBe('Test')
    ->and($setting->name)
    ->toBe('Test')

How to Reproduce

This doesn't work

expect($setting)
    ->value->toBe('Test')
    ->name->toBe('Test')

Sample Repository

No response

Pest Version

3.7.1

PHP Version

8.3.6

Operation System

Windows

Notes

No response

@ravibpatel ravibpatel added the bug label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant