Skip to content

Commit

Permalink
Uses Pest 2 (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Mar 20, 2023
1 parent 1291d7f commit 2f3828e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ['8.0', 8.1, 8.2]
laravel: [9, 10]
exclude:
- php: '8.0'
laravel: 10
php: [8.1, 8.2]
laravel: [10]

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

Expand Down
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
}
],
"require": {
"php": "^8.0.2",
"php": "^8.1.0",
"ext-json": "*",
"illuminate/console": "^9.21|^10.0",
"illuminate/support": "^9.21|^10.0",
"illuminate/console": "^10.0",
"illuminate/support": "^10.0",
"jenssegers/agent": "^2.6",
"laravel/fortify": "^1.15"
},
Expand All @@ -26,13 +26,10 @@
"laravel/sanctum": "^3.0",
"livewire/livewire": "^2.12",
"mockery/mockery": "^1.0",
"orchestra/testbench": "^7.0|^8.0",
"orchestra/testbench": "^8.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.3"
},
"conflict": {
"laravel/framework": "<9.37.0"
},
"autoload": {
"psr-4": {
"Laravel\\Jetstream\\": "src/"
Expand Down
4 changes: 2 additions & 2 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public function handle()
$stubs = $this->getTestStubsPath();

if ($this->option('pest')) {
$this->removeComposerDevPackages(['nunomaduro/collision', 'phpunit/phpunit']);
$this->removeComposerDevPackages(['phpunit/phpunit']);

if (! $this->requireComposerDevPackages(['nunomaduro/collision:^6.4', 'pestphp/pest:^1.22', 'pestphp/pest-plugin-laravel:^1.2'])) {
if (! $this->requireComposerDevPackages(['pestphp/pest:^2.0', 'pestphp/pest-plugin-laravel:^2.0'])) {
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

test('example', function () {
it('returns a successful response', function () {
$response = $this->get('/');

$response->assertStatus(200);
Expand Down
2 changes: 1 addition & 1 deletion stubs/pest-tests/ExampleUnitTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

test('example', function () {
test('that true is true', function () {
expect(true)->toBeTrue();
});

0 comments on commit 2f3828e

Please sign in to comment.