Skip to content

Commit dbbf01b

Browse files
committed
Fix for compatibility with Laravel 6
1 parent c33854f commit dbbf01b

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

.gitignore

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
# phpstorm project files
2-
.idea
3-
4-
# netbeans project files
5-
nbproject
6-
7-
# zend studio for eclipse project files
8-
.buildpath
9-
.project
10-
.settings
11-
121
# windows thumbnail cache
132
Thumbs.db
143

154
# composer vendor dir
165
/vendor
17-
186
/composer.lock
197

208
# composer itself is not needed
@@ -23,13 +11,13 @@ composer.phar
2311
# Mac DS_Store Files
2412
.DS_Store
2513

26-
# phpunit itself is not needed
27-
phpunit.phar
2814
# local phpunit config
2915
/phpunit.xml
16+
/.phpunit.cache
17+
.phpunit.result.cache
3018

3119
# local tests configuration
3220
/tests/data/config.local.php
3321

3422
# runtime cache
35-
/tests/runtime
23+
/tests/runtime

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=7.1",
17-
"illuminate/database": "~5.5",
18-
"illuminate/support": "~5.5"
16+
"php": ">=7.4",
17+
"illuminate/database": "~5.5|^6.0",
18+
"illuminate/support": "~5.5|^6.0"
1919
},
2020
"require-dev": {
2121
"friendsofphp/php-cs-fixer": "~2.0",
22-
"phpunit/phpunit": "~6.0",
23-
"orchestra/testbench": "~3.5.0"
22+
"phpunit/phpunit": "~9.0",
23+
"dms/phpunit-arraysubset-asserts": "^0.5.0",
24+
"orchestra/testbench": "~3.5.0|^4.0"
2425
},
2526
"autoload": {
2627
"psr-4": {

phpunit.xml.dist

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
processIsolation="false"
9-
stopOnFailure="false"
10-
syntaxCheck="false"
11-
bootstrap="./vendor/autoload.php">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheResultFile=".phpunit.cache/test-results"
6+
executionOrder="depends,defects"
7+
forceCoversAnnotation="false"
8+
beStrictAboutCoversAnnotation="false"
9+
beStrictAboutOutputDuringTests="true"
10+
beStrictAboutTodoAnnotatedTests="true"
11+
convertDeprecationsToExceptions="true"
12+
failOnRisky="true"
13+
failOnWarning="true"
14+
verbose="true">
1215
<testsuites>
1316
<testsuite name="Laravel Fixtures Test Suite">
14-
<directory suffix=".php">./tests</directory>
17+
<directory suffix=".php">tests</directory>
1518
</testsuite>
1619
</testsuites>
20+
21+
<coverage cacheDirectory=".phpunit.cache/code-coverage"
22+
processUncoveredFiles="true">
23+
<include>
24+
<directory suffix=".php">src</directory>
25+
</include>
26+
</coverage>
1727
</phpunit>

tests/FixtureTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace CorpSoft\Tests\Fixture;
44

55
use CorpSoft\Fixture\Exceptions\InvalidConfigException;
6+
use DMS\PHPUnitExtensions\ArraySubset\Assert;
67

78
/**
89
* Class FixtureTest
@@ -62,7 +63,7 @@ public function testGetFixtureData()
6263

6364
$this->assertCount(2, $fixture->data);
6465

65-
$this->assertArraySubset([
66+
Assert::assertArraySubset([
6667
['email' => '[email protected]'],
6768
], $fixture->data);
6869
}

tests/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
namespace CorpSoft\Tests\Fixture;
44

55
use Illuminate\Database\Schema\Blueprint;
6-
use Orchestra\Testbench\TestCase as Orchestra;
6+
use Orchestra\Testbench\TestCase as BaseTestCase;
77

88
/**
99
* Class TestCase
1010
*
1111
* @package CorpSoft\Tests\Fixture
1212
*/
13-
abstract class TestCase extends Orchestra
13+
abstract class TestCase extends BaseTestCase
1414
{
1515
/**
1616
* @inheritdoc
1717
*/
18-
public function setUp()
18+
public function setUp(): void
1919
{
2020
parent::setUp();
2121

0 commit comments

Comments
 (0)