Skip to content

Commit b6b9e03

Browse files
authored
[4.x] Uses Pest v2 (#262)
* Uses Pest v2 * Fixes unit stub * Fixes missing argument
1 parent 59ea3b7 commit b6b9e03

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/NewCommand.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ protected function installJetstream(string $directory, string $stack, string $te
254254
$commands = array_filter([
255255
$this->findComposer().' require laravel/jetstream',
256256
trim(sprintf(
257-
PHP_BINARY.' artisan jetstream:install %s %s %s',
257+
PHP_BINARY.' artisan jetstream:install %s %s %s %s',
258258
$stack,
259259
$teams ? '--teams' : '',
260260
$dark ? '--dark' : '',
@@ -366,12 +366,14 @@ protected function installPest(string $directory, InputInterface $input, OutputI
366366
chdir($directory);
367367

368368
$commands = array_filter([
369-
$this->findComposer().' remove nunomaduro/collision phpunit/phpunit --dev',
370-
$this->findComposer().' require nunomaduro/collision:^6.4 pestphp/pest:^1.22 pestphp/pest-plugin-laravel:^1.4 --dev',
371-
PHP_BINARY.' artisan pest:install --no-interaction',
369+
$this->findComposer().' remove phpunit/phpunit --dev',
370+
$this->findComposer().' require pestphp/pest:^2.0 pestphp/pest-plugin-laravel:^2.0 --dev',
371+
PHP_BINARY.' ./vendor/bin/pest --init',
372372
]);
373373

374-
$this->runCommands($commands, $input, $output);
374+
$this->runCommands($commands, $input, $output, [
375+
'PEST_NO_SUPPORT' => 'true',
376+
]);
375377

376378
$this->replaceFile(
377379
'pest/Feature.php',

stubs/pest/Unit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

33
test('that true is true', function () {
4-
expect(true)->toBeTrue(true);
4+
expect(true)->toBeTrue();
55
});

0 commit comments

Comments
 (0)