Skip to content

Commit

Permalink
Merge pull request #169 from laravel/phpunit10
Browse files Browse the repository at this point in the history
[7.x] PHPUnit v10 Support
  • Loading branch information
taylorotwell authored Feb 14, 2023
2 parents 4cdedb6 + 4fe802c commit c790960
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 433 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/vendor
composer.lock
/phpunit.xml
/.phpunit.cache
.phpunit.result.cache
18 changes: 18 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Upgrade Guide

## Upgrading To 7.0 From 6.x

### Minimum Versions

The following required dependency versions have been updated:

- The minimum PHP version is now v8.1
- The minimum Laravel version is now v10.0
- The minimum PHPUnit version is now v10.0

### Service Mocking

The deprecated `MocksApplicationServices` trait has been removed from the library. This trait provided testing methods such as `expectsEvents` and `expectsJobs`.

If your application uses these methods, we recommend you transition to `Event::fake` and `Bus::fake`, respectively. You can learn more about mocking via fakes in the corresponding documentation for the component you are attempting to fake.


## Upgrading To 6.0 From 5.x

### Minimum Laravel Version
Expand All @@ -20,6 +37,7 @@ PR: https://github.com/laravel/browser-kit-testing/pull/107

When using the `followRedirects` method, previously defined cookies will now be preserved.


## Upgrading To 5.0 From 4.x

### PHPUnit 8
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"illuminate/support": "^10.0",
"illuminate/testing": "^10.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^10.0.7",
"symfony/console": "^6.2",
"symfony/css-selector": "^6.2",
"symfony/dom-crawler": "^6.2",
Expand Down
13 changes: 6 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests</directory>
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>
Loading

0 comments on commit c790960

Please sign in to comment.