Skip to content

Commit 134957c

Browse files
authored
Merge pull request #1513 from drbyte/phpunit12
Add PHPUnit 12 support, and upgrade phpunit-polyfills
2 parents c350b59 + 80f9dce commit 134957c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ jobs:
3737
run: composer install --no-interaction --prefer-dist
3838

3939
- name: Execute tests
40-
run: vendor/bin/phpunit --verbose
40+
run: vendor/bin/phpunit
4141
env:
4242
APP_ENV: testing

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"require-dev": {
5151
"mockery/mockery": "^1.2.3",
52-
"yoast/phpunit-polyfills": "^0.2.0",
52+
"yoast/phpunit-polyfills": "^0.2.0|^4.0",
5353
"laravel/pint": "^1.4"
5454
},
5555
"bin": [

tests/BrewTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Illuminate\Container\Container;
44
use Illuminate\Support\Collection;
5+
use PHPUnit\Framework\Attributes\DataProvider;
56
use Valet\Brew;
67
use Valet\CommandLine;
78
use Valet\Filesystem;
@@ -388,6 +389,7 @@ public function test_get_all_running_services_will_return_unique_services()
388389
/**
389390
* @dataProvider supportedPhpLinkPathProvider
390391
*/
392+
#[DataProvider('supportedPhpLinkPathProvider')]
391393
public function test_get_parsed_linked_php_will_return_matches_for_linked_php($path, $matches)
392394
{
393395
$getBrewMock = function ($filesystem) {
@@ -405,6 +407,7 @@ public function test_get_parsed_linked_php_will_return_matches_for_linked_php($p
405407
/**
406408
* @dataProvider supportedPhpLinkPathProvider
407409
*/
410+
#[DataProvider('supportedPhpLinkPathProvider')]
408411
public function test_get_linked_php_formula_will_return_linked_php_directory($path, $matches, $expectedLinkFormula)
409412
{
410413
$brewMock = Mockery::mock(Brew::class)->makePartial();
@@ -489,7 +492,7 @@ public function test_it_can_compare_two_php_versions()
489492
/**
490493
* Provider of php links and their expected split matches.
491494
*/
492-
public function supportedPhpLinkPathProvider(): array
495+
public static function supportedPhpLinkPathProvider(): array
493496
{
494497
return [
495498
[

0 commit comments

Comments
 (0)