From ae3519eb7f7ba2f083c338fd34b253365835cefb Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 23 Jul 2019 15:19:31 +0200 Subject: [PATCH] NEW Increase minimum SilverStripe version to 3.7 and adjust PHP versions in Travis builds --- .travis.yml | 26 +++++++++----------------- composer.json | 12 ++++-------- tests/SubsiteXHRControllerTest.php | 7 ++----- 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b0d46b..fd42d73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,26 +2,18 @@ language: php -sudo: false - -dist: precise - -php: - - 5.4 - -env: - - DB=MYSQL CORE_RELEASE=3.5 +dist: trusty matrix: include: - - php: 5.3 - env: DB=PGSQL CORE_RELEASE=3.4 - - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3.6 - - php: 5.4 - env: DB=MYSQL CORE_RELEASE=3.6 - - php: 7.1 - env: DB=MYSQL CORE_RELEASE=3.6 + - php: '7.1' + env: DB=PGSQL CORE_RELEASE=3.7 + - php: '7.1' + env: DB=MYSQL CORE_RELEASE=3.7 + - php: '7.2' + env: DB=MYSQL CORE_RELEASE=3.7 + - php: '7.3' + env: DB=MYSQL CORE_RELEASE=3.7 before_script: - composer self-update || true diff --git a/composer.json b/composer.json index 696fc4a..6c3f0a9 100644 --- a/composer.json +++ b/composer.json @@ -15,15 +15,11 @@ } ], "require": { - "silverstripe/framework": "~3.2", - "silverstripe/cms": "~3.2" + "silverstripe/framework": "~3.7", + "silverstripe/cms": "~3.7" }, "require-dev": { - "phpunit/PHPUnit": "~3.7@stable" + "phpunit/phpunit": "^5.7" }, - "extra": { - "branch-alias": { - "1.x-dev": "1.5.x-dev" - } - } + "extra": [] } diff --git a/tests/SubsiteXHRControllerTest.php b/tests/SubsiteXHRControllerTest.php index c38a150..5d62a94 100644 --- a/tests/SubsiteXHRControllerTest.php +++ b/tests/SubsiteXHRControllerTest.php @@ -1,10 +1,7 @@ 'XMLHttpRequest' )); $this->assertEquals(200, $result->getStatusCode()); - $this->assertEquals('text/json', $result->getHeader('Content-Type')); + $this->assertEquals('application/json', $result->getHeader('Content-Type')); $body = $result->getBody(); $this->assertContains('Main site', $body); $this->assertContains('Test 1', $body);