API Update to use PHPUnit 7, bump minimum PHP version to 7.1

This commit is contained in:
Robbie Averill 2017-12-18 00:49:56 +13:00
parent 125039dc5c
commit f5d52aeae8
3 changed files with 7 additions and 14 deletions

View File

@ -9,27 +9,19 @@ cache:
- $HOME/.composer/cache/files
php:
- 5.6
- 7.1
- 7.2
env:
matrix:
- PHPUNIT_TEST=1
- PHPCS_TEST=1
matrix:
include:
- php: 5.6
env: PHPUNIT_TEST=1
- php: 7.0
env: PHPUNIT_TEST=1
- php: 7.1.2
env: PHPUNIT_TEST=1
before_script:
- export PATH=~/.composer/vendor/bin:$PATH
- composer validate
- composer install --dev --prefer-dist
- composer require --prefer-dist --no-update silverstripe/recipe-core:1.0.x-dev
- composer require --prefer-dist --no-update silverstripe/recipe-core:2.x-dev
- composer update
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
- phpenv rehash

View File

@ -21,8 +21,8 @@
}
],
"require": {
"php": ">=5.6",
"phpunit/phpunit": "^5.7",
"php": ">=7.1",
"phpunit/phpunit": "^7@dev",
"behat/behat": "^3.2",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.1",

View File

@ -8,10 +8,11 @@ use Behat\Mink\Session;
use Behat\Mink\Mink;
use Behat\Mink\Driver\DriverInterface;
use Behat\Mink\Element\Element;
use PHPUnit\Framework\TestCase;
use SilverStripe\BehatExtension\Tests\SilverStripeContextTest\FeatureContext;
use SilverStripe\Dev\SapphireTest;
class SilverStripeContextTest extends \PHPUnit_Framework_TestCase
class SilverStripeContextTest extends TestCase
{
protected $backupGlobals = false;