Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API phpunit 9 support #310

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ matrix:
fast_finish: true
include:
# Core php tests
- php: 7.1
- php: 7.3
env:
- DB=MYSQL
- PHPUNIT_TEST=1
- PHPUNIT_SUITE="core"
- PDO=1
- COMPOSER_INSTALL_ARG="--prefer-lowest"
- php: 7.2
- php: 7.3
env:
- DB=MYSQL
- PHPUNIT_TEST=1
Expand All @@ -43,14 +43,14 @@ matrix:
- PHPUNIT_SUITE="core"
- COMPOSER_INSTALL_ARG="--ignore-platform-reqs"
# admin php tests
- php: 7.1
- php: 7.3
env:
- DB=MYSQL
- PHPUNIT_TEST=1
- PHPUNIT_SUITE="admin"
- PDO=1
- COMPOSER_INSTALL_ARG="--prefer-lowest"
- php: 7.2
- php: 7.3
env:
- DB=PGSQL
- PHPUNIT_TEST=1
Expand All @@ -67,12 +67,12 @@ matrix:
- PHPUNIT_SUITE="admin"
- COMPOSER_INSTALL_ARG="--ignore-platform-reqs"
# behat tests
- php: 7.1
- php: 7.3
env:
- DB=MYSQL
- BEHAT_TEST=1
- BEHAT_SUITE="admin"
- php: 7.2
- php: 7.3
env:
- DB=MYSQL
- BEHAT_TEST=1
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
"type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer",
"require": {
"php": "^7.1 || ^8",
"php": "^7.3 || ^8.0",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "4.x-dev",
"silverstripe-themes/simple": "~3.2.0",
"silverstripe/login-forms": "4.x-dev"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
"sminnee/phpunit-mock-objects": "^3.4.5"
"phpunit/phpunit": "^9.5"
},
"extra": {
"project-files": [
Expand Down
52 changes: 27 additions & 25 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
PHPUnit configuration for SilverStripe

Requires PHPUnit 5+
Requires PHPUnit 9+

Usage:
- "vendor/bin/phpunit": Runs all tests in all folders
Expand All @@ -18,31 +18,33 @@
It is safe to remove this file for normal website operation.
-->
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<testsuite name="Default">
<directory>app/tests</directory>
<directory>vendor/silverstripe/cms/tests/php</directory>
<directory>vendor/silverstripe/framework/tests/php</directory>
</testsuite>
<testsuites>
<testsuite name="Default">
<directory>app/tests</directory>
<directory>vendor/silverstripe/cms/tests/php</directory>
<directory>vendor/silverstripe/framework/tests/php</directory>
</testsuite>

<!-- framework only -->
<testsuite name="framework">
<directory>vendor/silverstripe/framework/tests/php/</directory>
</testsuite>
<!-- framework only -->
<testsuite name="framework">
<directory>vendor/silverstripe/framework/tests/php/</directory>
</testsuite>

<!-- other core components -->
<testsuite name="core">
<directory>vendor/silverstripe/assets/tests/php/</directory>
<directory>vendor/silverstripe/versioned/tests/php/</directory>
</testsuite>
<!-- other core components -->
<testsuite name="core">
<directory>vendor/silverstripe/assets/tests/php/</directory>
<directory>vendor/silverstripe/versioned/tests/php/</directory>
</testsuite>

<!-- admin components -->
<testsuite name="admin">
<directory>vendor/silverstripe/admin/tests/php/</directory>
<directory>vendor/silverstripe/asset-admin/tests/php/</directory>
<directory>vendor/silverstripe/campaign-admin/tests/php/</directory>
<directory>vendor/silverstripe/cms/tests/</directory>
<directory>vendor/silverstripe/graphql/tests/</directory>
<directory>vendor/silverstripe/reports/tests/</directory>
<directory>vendor/silverstripe/siteconfig/tests/php/</directory>
</testsuite>
<!-- admin components -->
<testsuite name="admin">
<directory>vendor/silverstripe/admin/tests/php/</directory>
<directory>vendor/silverstripe/asset-admin/tests/php/</directory>
<directory>vendor/silverstripe/campaign-admin/tests/php/</directory>
<directory>vendor/silverstripe/cms/tests/</directory>
<directory>vendor/silverstripe/graphql/tests/</directory>
<directory>vendor/silverstripe/reports/tests/</directory>
<directory>vendor/silverstripe/siteconfig/tests/php/</directory>
</testsuite>
</testsuites>
</phpunit>