mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
Add PHPUnit 12 support, and upgrade phpunit-polyfills
Added `DataProvider` attribute, to support newer PHPUnit, in order to support latest phpunit-polyfills. Closes #1512 which only did part of the update
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "^1.2.3",
|
"mockery/mockery": "^1.2.3",
|
||||||
"yoast/phpunit-polyfills": "^0.2.0",
|
"yoast/phpunit-polyfills": "^0.2.0|^4.0",
|
||||||
"laravel/pint": "^1.4"
|
"laravel/pint": "^1.4"
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Illuminate\Container\Container;
|
use Illuminate\Container\Container;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use PHPUnit\Framework\Attributes\DataProvider;
|
||||||
use Valet\Brew;
|
use Valet\Brew;
|
||||||
use Valet\CommandLine;
|
use Valet\CommandLine;
|
||||||
use Valet\Filesystem;
|
use Valet\Filesystem;
|
||||||
@@ -388,6 +389,7 @@ public function test_get_all_running_services_will_return_unique_services()
|
|||||||
/**
|
/**
|
||||||
* @dataProvider supportedPhpLinkPathProvider
|
* @dataProvider supportedPhpLinkPathProvider
|
||||||
*/
|
*/
|
||||||
|
#[DataProvider('supportedPhpLinkPathProvider')]
|
||||||
public function test_get_parsed_linked_php_will_return_matches_for_linked_php($path, $matches)
|
public function test_get_parsed_linked_php_will_return_matches_for_linked_php($path, $matches)
|
||||||
{
|
{
|
||||||
$getBrewMock = function ($filesystem) {
|
$getBrewMock = function ($filesystem) {
|
||||||
@@ -405,6 +407,7 @@ public function test_get_parsed_linked_php_will_return_matches_for_linked_php($p
|
|||||||
/**
|
/**
|
||||||
* @dataProvider supportedPhpLinkPathProvider
|
* @dataProvider supportedPhpLinkPathProvider
|
||||||
*/
|
*/
|
||||||
|
#[DataProvider('supportedPhpLinkPathProvider')]
|
||||||
public function test_get_linked_php_formula_will_return_linked_php_directory($path, $matches, $expectedLinkFormula)
|
public function test_get_linked_php_formula_will_return_linked_php_directory($path, $matches, $expectedLinkFormula)
|
||||||
{
|
{
|
||||||
$brewMock = Mockery::mock(Brew::class)->makePartial();
|
$brewMock = Mockery::mock(Brew::class)->makePartial();
|
||||||
@@ -489,7 +492,7 @@ public function test_it_can_compare_two_php_versions()
|
|||||||
/**
|
/**
|
||||||
* Provider of php links and their expected split matches.
|
* Provider of php links and their expected split matches.
|
||||||
*/
|
*/
|
||||||
public function supportedPhpLinkPathProvider(): array
|
public static function supportedPhpLinkPathProvider(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user