From 7d660c109e98a82546849e7e82dd7be309028a31 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 2 Nov 2021 09:53:31 +1300 Subject: [PATCH] API phpunit 9 support --- .travis.yml | 6 +++--- composer.json | 9 +++------ phpunit.xml.dist | 8 +++++--- tests/Methods/ChainedMethodTest.php | 4 ++-- tests/Methods/CopyMethodTest.php | 4 ++-- tests/Methods/SymlinkMethodTest.php | 4 ++-- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26e9149..c24561e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,14 @@ env: jobs: fast_finish: true include: - - php: 7.1 + - php: 7.3 env: - COMPOSER_INSTALL_ARG=--prefer-lowest - - php: 7.3 + - php: 7.4 env: - PHPCS_TEST=1 - php: 7.4 env: - - php: nightly + - php: 8.0 env: - COMPOSER_INSTALL_ARG=--ignore-platform-reqs diff --git a/composer.json b/composer.json index 69a9681..cf18fa4 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,7 @@ } }, "extra": { - "class": "SilverStripe\\VendorPlugin\\VendorPlugin", - "branch-alias": { - "1.x-dev": "1.4.x-dev" - } + "class": "SilverStripe\\VendorPlugin\\VendorPlugin" }, "scripts": { "lint": "phpcs src/ tests/", @@ -28,11 +25,11 @@ "require": { "composer/installers": "^1.4", "composer-plugin-api": "^1.1 || ^2", - "php": "^7.1 || ^8" + "php": "^7.3 || ^8" }, "require-dev": { "composer/composer": "^1.5 || ^2@rc", - "sminnee/phpunit": "^5.7", + "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 38311e2..43fe4da 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,8 @@ - - tests/ - + + + tests/ + + diff --git a/tests/Methods/ChainedMethodTest.php b/tests/Methods/ChainedMethodTest.php index 7ed1948..86c7e87 100644 --- a/tests/Methods/ChainedMethodTest.php +++ b/tests/Methods/ChainedMethodTest.php @@ -21,7 +21,7 @@ class ChainedMethodTest extends TestCase */ protected $root = null; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -37,7 +37,7 @@ protected function setUp() $this->filesystem->ensureDirectoryExists($this->root); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->root); parent::tearDown(); diff --git a/tests/Methods/CopyMethodTest.php b/tests/Methods/CopyMethodTest.php index 623d40c..dd3fe9c 100644 --- a/tests/Methods/CopyMethodTest.php +++ b/tests/Methods/CopyMethodTest.php @@ -20,7 +20,7 @@ class CopyMethodTest extends TestCase */ protected $root = null; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -36,7 +36,7 @@ protected function setUp() $this->filesystem->ensureDirectoryExists($this->root); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->root); parent::tearDown(); diff --git a/tests/Methods/SymlinkMethodTest.php b/tests/Methods/SymlinkMethodTest.php index 455bc98..9d0e72b 100644 --- a/tests/Methods/SymlinkMethodTest.php +++ b/tests/Methods/SymlinkMethodTest.php @@ -21,7 +21,7 @@ class SymlinkMethodTest extends TestCase */ protected $root = null; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -37,7 +37,7 @@ protected function setUp() $this->filesystem->ensureDirectoryExists($this->root); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->root); parent::tearDown();