From e8fd9171450006a2710bd07407eaa9dfe6664386 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 5 Dec 2019 12:45:36 +0100 Subject: Update master php testing versions Signed-off-by: Joas Schilling --- .travis.yml | 28 +++++++++++----------- tests/unit/Config/ConfigParserTest.php | 2 +- tests/unit/Config/ConfigValidatorTest.php | 2 +- tests/unit/Controller/ConfigApiControllerTest.php | 2 +- tests/unit/Controller/ConfigControllerTest.php | 2 +- .../unit/Controller/ConfigPublicControllerTest.php | 2 +- tests/unit/Controller/FilesApiControllerTest.php | 2 +- tests/unit/Controller/FilesControllerTest.php | 2 +- .../unit/Controller/FilesPublicControllerTest.php | 2 +- tests/unit/Controller/PageControllerTest.php | 2 +- tests/unit/Controller/PreviewApiControllerTest.php | 2 +- tests/unit/Controller/PreviewControllerTest.php | 2 +- .../Controller/PreviewPublicControllerTest.php | 2 +- tests/unit/Environment/EnvironmentTest.php | 2 +- tests/unit/GalleryUnitTest.php | 2 +- tests/unit/Middleware/EnvCheckMiddlewareTest.php | 2 +- .../unit/Middleware/SharingCheckMiddlewareTest.php | 2 +- tests/unit/Service/ConfigServiceTest.php | 2 +- tests/unit/Service/DownloadServiceTest.php | 2 +- tests/unit/Service/PreviewServiceTest.php | 2 +- tests/unit/Service/SearchFolderServiceTest.php | 2 +- tests/unit/Service/SearchMediaServiceTest.php | 2 +- 22 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33606146..75d9093a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ sudo: false language: php php: - - 7.1 - 7.2 - 7.3 + - 7.4snapshot addons: apt: @@ -88,10 +88,10 @@ before_script: - sh -c "pecl config-set preferred_state beta; echo yes | printf "\n" | pecl install imagick;" # Disable xdebug when we don't need coverage to speed up testing - - sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.1' ]; then phpenv config-rm xdebug.ini; fi;" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' != 'mysql' ]; then phpenv config-rm xdebug.ini; fi;" + - sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.3' ]; then phpenv config-rm xdebug.ini; fi;" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' != 'mysql' ]; then phpenv config-rm xdebug.ini; fi;" # Always install the latest version of the xdebug PHP extension - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then cd build; bash xdebug_install.sh; cd ${TRAVIS_BUILD_DIR}/../${SERVER_FOLDER}/apps/$APP_NAME; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then cd build; bash xdebug_install.sh; cd ${TRAVIS_BUILD_DIR}/../${SERVER_FOLDER}/apps/$APP_NAME; fi" # Sets up the PHP composer cache - sh -c "if [ ! -d ${TRAVIS_BUILD_DIR}/travis/php-cache/`php-config --vernum` ]; then mkdir -p ${TRAVIS_BUILD_DIR}/travis/php-cache/`php-config --vernum`; fi;" @@ -111,26 +111,26 @@ script: # Acceptance tests, using Firefox, without code coverage - php vendor/bin/codecept run acceptance --env firefox # Unit, integration and api tests, without code coverage - - sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.1' ]; then php vendor/bin/codecept run unit,integration,api; fi;" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' != 'mysql' ]; then php vendor/bin/codecept run unit,integration,api; fi;" + - sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.3' ]; then php vendor/bin/codecept run unit,integration,api; fi;" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' != 'mysql' ]; then php vendor/bin/codecept run unit,integration,api; fi;" # PHP 7.1 ONLY: Unit, integration and api tests with code coverage - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/codecept run unit,integration,api --coverage --coverage-xml --coverage-html; fi;" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/codecept run unit,integration,api --coverage --coverage-xml --coverage-html; fi;" # We can't use phpdbg only as it doesn't work with the webdriver and we can't use it for some tests only as we can't merge html reports # - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then phpenv config-rm xdebug.ini; phpdbg -qrr vendor/bin/codecept run unit,integration,api --coverage --coverage-xml --coverage-html; fi;" after_success: # Send coverage report to Codecov - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then wget https://codecov.io/bash -O codecov.sh; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ] && [ '$TRAVIS_PULL_REQUEST' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -P $TRAVIS_PULL_REQUEST -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then wget https://codecov.io/bash -O codecov.sh; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ] && [ '$TRAVIS_PULL_REQUEST' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -P $TRAVIS_PULL_REQUEST -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then bash codecov.sh -B $TRAVIS_BRANCH -C $TRAVIS_COMMIT -t 739120c2-700d-47c4-845c-c0d0c9c3707d -f tests/_output/coverage.xml; fi" # Generate API documentation - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/phpdoc run; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then php vendor/bin/phpdoc run; fi" # Generate Wiki documentation - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then git submodule update --init; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then git submodule update --init; fi" # Send documentation to Github Pages - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.1' ] && [ '$DB' = 'mysql' ]; then cd build/documentation; bash ./docpublisher.sh; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '7.3' ] && [ '$DB' = 'mysql' ]; then cd build/documentation; bash ./docpublisher.sh; fi" after_failure: - cat tests/_output/phpbuiltinserver.errors.txt @@ -139,6 +139,6 @@ after_failure: matrix: include: - - php: 7.1 + - php: 7.3 env: DB=pgsql fast_finish: true diff --git a/tests/unit/Config/ConfigParserTest.php b/tests/unit/Config/ConfigParserTest.php index 5d8dce8f..0632c626 100644 --- a/tests/unit/Config/ConfigParserTest.php +++ b/tests/unit/Config/ConfigParserTest.php @@ -34,7 +34,7 @@ class ConfigParserTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->configParser = new ConfigParser(); diff --git a/tests/unit/Config/ConfigValidatorTest.php b/tests/unit/Config/ConfigValidatorTest.php index edcb7135..6b0dcc3b 100644 --- a/tests/unit/Config/ConfigValidatorTest.php +++ b/tests/unit/Config/ConfigValidatorTest.php @@ -28,7 +28,7 @@ class ConfigValidatorTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->configValidator = new ConfigValidator(); diff --git a/tests/unit/Controller/ConfigApiControllerTest.php b/tests/unit/Controller/ConfigApiControllerTest.php index 60d8e8e5..0ed7c971 100644 --- a/tests/unit/Controller/ConfigApiControllerTest.php +++ b/tests/unit/Controller/ConfigApiControllerTest.php @@ -22,7 +22,7 @@ use OCA\Gallery\Controller\ConfigApiController; */ class ConfigApiControllerTest extends ConfigControllerTest { - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = new ConfigApiController( $this->appName, diff --git a/tests/unit/Controller/ConfigControllerTest.php b/tests/unit/Controller/ConfigControllerTest.php index aa5c7754..a61c9c70 100644 --- a/tests/unit/Controller/ConfigControllerTest.php +++ b/tests/unit/Controller/ConfigControllerTest.php @@ -60,7 +60,7 @@ class ConfigControllerTest extends \Test\TestCase { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\OCP\IRequest') diff --git a/tests/unit/Controller/ConfigPublicControllerTest.php b/tests/unit/Controller/ConfigPublicControllerTest.php index 98bf322b..974e2dde 100644 --- a/tests/unit/Controller/ConfigPublicControllerTest.php +++ b/tests/unit/Controller/ConfigPublicControllerTest.php @@ -22,7 +22,7 @@ use OCA\Gallery\Controller\ConfigPublicController; */ class ConfigPublicControllerTest extends ConfigControllerTest { - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = new ConfigPublicController( $this->appName, diff --git a/tests/unit/Controller/FilesApiControllerTest.php b/tests/unit/Controller/FilesApiControllerTest.php index d8a6ef21..b9f09be6 100644 --- a/tests/unit/Controller/FilesApiControllerTest.php +++ b/tests/unit/Controller/FilesApiControllerTest.php @@ -26,7 +26,7 @@ use OCA\Gallery\Service\NotFoundServiceException; */ class FilesApiControllerTest extends FilesControllerTest { - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = new FilesApiController( $this->appName, diff --git a/tests/unit/Controller/FilesControllerTest.php b/tests/unit/Controller/FilesControllerTest.php index 168a4c64..33f735f5 100644 --- a/tests/unit/Controller/FilesControllerTest.php +++ b/tests/unit/Controller/FilesControllerTest.php @@ -68,7 +68,7 @@ class FilesControllerTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $app = new Application; diff --git a/tests/unit/Controller/FilesPublicControllerTest.php b/tests/unit/Controller/FilesPublicControllerTest.php index ce20949e..c0b03752 100644 --- a/tests/unit/Controller/FilesPublicControllerTest.php +++ b/tests/unit/Controller/FilesPublicControllerTest.php @@ -22,7 +22,7 @@ use OCA\Gallery\Controller\FilesPublicController; */ class FilesPublicControllerTest extends FilesControllerTest { - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = new FilesPublicController( $this->appName, diff --git a/tests/unit/Controller/PageControllerTest.php b/tests/unit/Controller/PageControllerTest.php index b7aa243b..7f047ef0 100644 --- a/tests/unit/Controller/PageControllerTest.php +++ b/tests/unit/Controller/PageControllerTest.php @@ -54,7 +54,7 @@ class PageControllerTest extends \Test\TestCase { /** * Test set up */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/unit/Controller/PreviewApiControllerTest.php b/tests/unit/Controller/PreviewApiControllerTest.php index 7193921a..994fff4f 100644 --- a/tests/unit/Controller/PreviewApiControllerTest.php +++ b/tests/unit/Controller/PreviewApiControllerTest.php @@ -30,7 +30,7 @@ class PreviewApiControllerTest extends PreviewControllerTest { /** @var PreviewApiController */ protected $controller; - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = new PreviewApiController( $this->appName, diff --git a/tests/unit/Controller/PreviewControllerTest.php b/tests/unit/Controller/PreviewControllerTest.php index 81a70e0e..259da67e 100644 --- a/tests/unit/Controller/PreviewControllerTest.php +++ b/tests/unit/Controller/PreviewControllerTest.php @@ -66,7 +66,7 @@ class PreviewControllerTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $app = new Application; diff --git a/tests/unit/Controller/PreviewPublicControllerTest.php b/tests/unit/Controller/PreviewPublicControllerTest.php index d284c4b7..accbca8d 100644 --- a/tests/unit/Controller/PreviewPublicControllerTest.php +++ b/tests/unit/Controller/PreviewPublicControllerTest.php @@ -22,7 +22,7 @@ use OCA\Gallery\Controller\PreviewPublicController; */ class PreviewPublicControllerTest extends PreviewControllerTest { - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = new PreviewPublicController( $this->appName, diff --git a/tests/unit/Environment/EnvironmentTest.php b/tests/unit/Environment/EnvironmentTest.php index dc43b8ae..28cef79e 100644 --- a/tests/unit/Environment/EnvironmentTest.php +++ b/tests/unit/Environment/EnvironmentTest.php @@ -45,7 +45,7 @@ class EnvironmentTest extends \Test\TestCase { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $app = new Application(); diff --git a/tests/unit/GalleryUnitTest.php b/tests/unit/GalleryUnitTest.php index 9edc49c1..9fd255d2 100644 --- a/tests/unit/GalleryUnitTest.php +++ b/tests/unit/GalleryUnitTest.php @@ -37,7 +37,7 @@ abstract class GalleryUnitTest extends \Test\TestCase { /** * Test set up */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->environment = $this->getMockBuilder('\OCA\Gallery\Environment\Environment') diff --git a/tests/unit/Middleware/EnvCheckMiddlewareTest.php b/tests/unit/Middleware/EnvCheckMiddlewareTest.php index 6f70799c..c7df5669 100644 --- a/tests/unit/Middleware/EnvCheckMiddlewareTest.php +++ b/tests/unit/Middleware/EnvCheckMiddlewareTest.php @@ -65,7 +65,7 @@ class EnvCheckMiddlewareTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\OCP\IRequest') diff --git a/tests/unit/Middleware/SharingCheckMiddlewareTest.php b/tests/unit/Middleware/SharingCheckMiddlewareTest.php index b4a68700..37cca08e 100644 --- a/tests/unit/Middleware/SharingCheckMiddlewareTest.php +++ b/tests/unit/Middleware/SharingCheckMiddlewareTest.php @@ -60,7 +60,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { /** * Test set up */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\OCP\IRequest') diff --git a/tests/unit/Service/ConfigServiceTest.php b/tests/unit/Service/ConfigServiceTest.php index a59b604a..e6ac6da4 100644 --- a/tests/unit/Service/ConfigServiceTest.php +++ b/tests/unit/Service/ConfigServiceTest.php @@ -36,7 +36,7 @@ class ConfigServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->configParser = $this->getMockBuilder('\OCA\Gallery\Config\ConfigParser') diff --git a/tests/unit/Service/DownloadServiceTest.php b/tests/unit/Service/DownloadServiceTest.php index c62e3651..63a54877 100644 --- a/tests/unit/Service/DownloadServiceTest.php +++ b/tests/unit/Service/DownloadServiceTest.php @@ -34,7 +34,7 @@ class DownloadServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->service = new DownloadService ( diff --git a/tests/unit/Service/PreviewServiceTest.php b/tests/unit/Service/PreviewServiceTest.php index ae579049..e93e5d4e 100644 --- a/tests/unit/Service/PreviewServiceTest.php +++ b/tests/unit/Service/PreviewServiceTest.php @@ -36,7 +36,7 @@ class PreviewServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->previewManager = $this->getMockBuilder('\OCP\IPreview') diff --git a/tests/unit/Service/SearchFolderServiceTest.php b/tests/unit/Service/SearchFolderServiceTest.php index 3049453f..4100cc27 100644 --- a/tests/unit/Service/SearchFolderServiceTest.php +++ b/tests/unit/Service/SearchFolderServiceTest.php @@ -30,7 +30,7 @@ class SearchFolderServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->service = new SearchFolderService ( diff --git a/tests/unit/Service/SearchMediaServiceTest.php b/tests/unit/Service/SearchMediaServiceTest.php index 4a52f8d4..10934b29 100644 --- a/tests/unit/Service/SearchMediaServiceTest.php +++ b/tests/unit/Service/SearchMediaServiceTest.php @@ -31,7 +31,7 @@ class SearchMediaServiceTest extends \OCA\Gallery\Tests\GalleryUnitTest { /** * Test set up */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->service = new SearchMediaService ( -- cgit v1.2.3