Skip to content

[Bug]: expect not->toBeUsed() case sensitive #1379

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

Open
kullarkert opened this issue Apr 1, 2025 · 1 comment · May be fixed by ta-tikoma/phpunit-architecture-test#19
Open

[Bug]: expect not->toBeUsed() case sensitive #1379

kullarkert opened this issue Apr 1, 2025 · 1 comment · May be fixed by ta-tikoma/phpunit-architecture-test#19
Labels

Comments

@kullarkert
Copy link

kullarkert commented Apr 1, 2025

What Happened

When I use

test('check for dd, dump, var_dump, print_r left overs in code')
    ->expect(['dd', 'dump', 'var_dump', 'print_r', 'env'])
    ->not->toBeUsed();

I don't get test failing when I have print_R in my code. Sometimes when typing fast I write print_r with capital R and I would expect that this should be catched and test should fail.

How to Reproduce

test('check for dd, dump, var_dump, print_r left overs in code')
    ->expect(['dd', 'dump', 'var_dump', 'print_r', 'env'])
    ->not->toBeUsed();

Add some where print_R. Even If I add print_R to expect function then system will not catch this error.

Sample Repository

No response

Pest Version

3.8.0

PHP Version

8.3.13

Operation System

Linux

Notes

No response

@Danielopes7
Copy link

I did a PR related this issue -> ta-tikoma/phpunit-architecture-test#19

I think this should be resolved in this library instead in pest repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants