You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I can be missing something and I believe it's a bug, nevertheless.
What Happened
Any attempt to override any parent test class gives me TestCaseAlreadyInUse.
Same thing happens both for pest()->extend(SpecificTestCase::class) in the test file and in the Pest.php file.
How to Reproduce
//Pest.phppest()->extend(DuskTestCase::class)->in('Browser');
//can be in the Specific/AnyTest.php or in the Pest.php, both give same resultpest()->extend(SpecificDuskTestCase::class)->in('Browser/Tests/Specific');
Sample Repository
No response
Pest Version
3.4.1
PHP Version
8.3.7
Operation System
macOS
Notes
If this is the desired behaviour, what is the recommended way to override parent class for very-very 1-time niche cases?
In PHPUnit it's just vanilla PHP.
Creating a folder with "PestCanNotOverridePlaceHere" is a bit meh and not Laravelish enough, IMHO.
The text was updated successfully, but these errors were encountered:
The issue persists. I'm not demanding anything by any means, just want to understand, if it's a design decision and, if so, what is the way to have DatabaseMigration on some tests and LazyRefreshDatabase on tests in the same folder?
They belong to the same scope, domain, etc. Just sometimes in rare cases we care about order of IDs to make snapshot smoke tests easier.
And, overall, it was something, that was working just fine in PHPUnit (due to the class-based approach), so I assume we want PestPHP to behave the same to make it a drag-n-drop replacement with better syntax. Unless I'm missing something.
Hi. I can be missing something and I believe it's a bug, nevertheless.
What Happened
Any attempt to override any parent test class gives me
TestCaseAlreadyInUse
.Same thing happens both for
pest()->extend(SpecificTestCase::class)
in the test file and in thePest.php
file.How to Reproduce
Sample Repository
No response
Pest Version
3.4.1
PHP Version
8.3.7
Operation System
macOS
Notes
If this is the desired behaviour, what is the recommended way to override parent class for very-very 1-time niche cases?
In PHPUnit it's just vanilla PHP.
Creating a folder with "PestCanNotOverridePlaceHere" is a bit meh and not Laravelish enough, IMHO.
The text was updated successfully, but these errors were encountered: