Gonna keep this updated with things I find today as I rewrite my tests to Pest
let's head over to both ..Test.php files and modify the content to: the unit has feature test contents and otherwise.$this-> methods are not detected, and especially annoying when working with TestResponses (using VSCode)assertGuest() to work the same as assertCount() but it seems the magic methods are limited to PHPUnit's default assertions. I understand this is supposed to be Laravel agnostic, but it would be cool to have all TestClass methods available without $this.php artisan test command ran Pest if it's installed, or at least provided some way of customizing the binary-
[1]:

Really missed using the Better PHPUnit extension by Caleb, which allows you to run a test while you're inside the code by pressing cmd+t, so I made a fork that works with Pest.
cc @calebporzio
Thinking about the Better PHPUnit extension, could you just create an executable that checks if vendor/bin/pest is available and if not, fall back to vendor/bin/phpunit? And then set the better-phpunit.phpunitBinary to use that?
Example
#!/usr/bin/env bash
if [[ -f 'vendor/bin/pest' ]]; then
vendor/bin/pest $@
elif [[ -f 'vendor/bin/phpunit' ]]; then
vendor/bin/phpunit $@
else
echo No Pest or PHPUnit binaries were found.
exit 1
fi
(I haven't used the extension as I use PhpStorm, but it looks like the fork just is a search and replace?)
@owenvoke Yeah, I basically changed the regex (and had to change the filter a little also to avoid wrapping the whole thing in regex), but the rest of it is just search+replace to avoid conflicts with his extension.
That's also why the script above wouldn't work btw, Caleb's extension wraps the method name in a regex which is required to filter in phpunit but I couldn't get Pest to work until I removed it.
Ah, I hadn't seen the RegEx changes. Nice. :+1:
I also reached out to him on Twitter (since I didn't know he was in here) asking if he'd prefer me to PR the changes under some config option or to just keep the fork 馃槃
let's head over to both ..Test.php files and modify the content to: the unit has feature test contents and otherwise.Fixed.
lol, yeah. High order tests needs arguments that can be computed a static time - before even the framework gets booted.
Thanks.
Let's wait for the community to fix this.
$this-> methods are not detected, and especially annoying when working with TestResponses (using VSCode)Let's wait for the community to fix this.
Can you pull request to @calebporzio that?
assertGuest() to work the same as assertCount() but it seems the magic methods are limited to PHPUnit's default assertions. I understand this is supposed to be Laravel agnostic, but it would be cool to have all TestClass methods available without $this.no plans.
uses(..)->group('name')->in('folder-or-subfolder');
php artisan test command ran Pest if it's installed, or at least provided some way of customizing the binary-Fixed: https://github.com/nunomaduro/collision/commit/3a08241eb1ff4d1daf1cf6baaf07c832f9b2eed6.