Skip to content

Commit eeee703

Browse files
authored
Merge pull request #6 from RedberryProducts/p83-l12-test-fix
Compatibility fix
2 parents 9a17436 + a6aea0b commit eeee703

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"require-dev": {
2525
"laravel/pint": "^1.14",
2626
"nunomaduro/collision": "^8.8",
27-
"orchestra/testbench": "^10.0.0||^9.0.0",
28-
"pestphp/pest": "^4.0",
29-
"pestphp/pest-plugin-arch": "^4.0",
30-
"pestphp/pest-plugin-laravel": "^4.0"
27+
"orchestra/testbench": "^10.0",
28+
"pestphp/pest": "^3.0",
29+
"pestphp/pest-plugin-arch": "^3.0",
30+
"pestphp/pest-plugin-laravel": "^3.0"
3131
},
3232
"autoload": {
3333
"psr-4": {

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
55
backupGlobals="false"
66
bootstrap="vendor/autoload.php"
77
colors="true"
88
processIsolation="false"
99
stopOnFailure="false"
1010
executionOrder="random"
1111
failOnWarning="true"
12-
failOnRisky="true"
12+
failOnRisky="false"
1313
failOnEmptyTestSuite="true"
1414
beStrictAboutOutputDuringTests="true"
1515
cacheDirectory=".phpunit.cache"

tests/Pest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
uses(TestCase::class)->in(__DIR__);
77

88
uses()
9-
->beforeEach(fn () => MockClient::destroyGlobal())
9+
->beforeEach(function () {
10+
MockClient::destroyGlobal();
11+
})
1012
->in(__DIR__);

tests/TestCase.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ public function getEnvironmentSetUp($app)
3434
}
3535
*/
3636
}
37+
38+
protected function defineEnvironment($app)
39+
{
40+
// Configure the application environment for testing
41+
$app['config']->set('app.debug', true);
42+
$app['config']->set('app.env', 'testing');
43+
}
3744
}

0 commit comments

Comments
 (0)