Update PHPUnit from 3.7 to 4.8

This commit is contained in:
Daniel Hensby 2016-01-25 15:17:57 +00:00 committed by Ingo Schommer
parent 572ce8b278
commit 2fdc96a0de
6 changed files with 28 additions and 44 deletions

View File

@ -23,7 +23,7 @@
"symfony/yaml": "~2.7"
},
"require-dev": {
"phpunit/PHPUnit": "~3.7"
"phpunit/PHPUnit": "~4.8"
},
"extra": {
"branch-alias": {

View File

@ -1,9 +1,5 @@
<?php
if(!interface_exists('PHPUnit_Framework_TestListener')) {
return;
}
/**#@+
* @var int
*/

View File

@ -29,6 +29,10 @@
See section on [Migrating File DataObject from 3.x to 4.0](#migrating-file-dataobject-from-3x-to-40)
below for upgrade notes.
* Removed `dev/tests/` controller in favour of standard `vendor/bin/phpunit` command
* Updated PHPUnit from 3.7 to 4.8 ([upgrade notes](https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.0.0#backwards-compatibility-issues)).
Please remove any PHPUnit related `require_once()` calls (e.g. in `FeatureContext`
definitions of the [behat-extension](https://github.com/silverstripe-labs/silverstripe-behat-extension) module).
Run `composer require --dev 'phpunit/phpunit:~4.8' on existing projects to pull in the new dependency.
## New API

View File

@ -2,17 +2,11 @@
namespace SilverStripe\Framework\Test\Behaviour;
use SilverStripe\BehatExtension\Context\SilverStripeContext,
SilverStripe\BehatExtension\Context\BasicContext,
SilverStripe\BehatExtension\Context\LoginContext,
SilverStripe\BehatExtension\Context\FixtureContext,
SilverStripe\BehatExtension\Context\EmailContext,
SilverStripe\Framework\Test\Behaviour\CmsFormsContext,
SilverStripe\Framework\Test\Behaviour\CmsUiContext;
// PHPUnit
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Framework/Assert/Functions.php';
use SilverStripe\BehatExtension\Context\SilverStripeContext;
use SilverStripe\BehatExtension\Context\BasicContext;
use SilverStripe\BehatExtension\Context\LoginContext;
use SilverStripe\BehatExtension\Context\FixtureContext;
use SilverStripe\BehatExtension\Context\EmailContext;
/**
* Features context

View File

@ -2,22 +2,17 @@
namespace SilverStripe\Framework\Test\Behaviour;
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Context\Step,
Behat\Behat\Exception\PendingException,
Behat\Mink\Exception\ElementHtmlException,
Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode,
Behat\MinkExtension\Context\MinkContext as MinkContext;
use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
use Behat\Behat\Context\BehatContext;
use Behat\Behat\Context\Step;
use Behat\Behat\Exception\PendingException;
use Behat\Mink\Exception\ElementHtmlException;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkContext as MinkContext;
use Symfony\Component\DomCrawler\Crawler;
// PHPUnit
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Framework/Assert/Functions.php';
/**
* CmsFormsContext
*

View File

@ -2,20 +2,15 @@
namespace SilverStripe\Framework\Test\Behaviour;
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Context\Step,
Behat\Behat\Exception\PendingException,
Behat\Mink\Exception\ElementNotFoundException,
Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode,
Behat\Mink\Element\NodeElement;
// PHPUnit
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Framework/Assert/Functions.php';
use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
use Behat\Behat\Context\BehatContext;
use Behat\Behat\Context\Step;
use Behat\Behat\Exception\PendingException;
use Behat\Mink\Exception\ElementNotFoundException;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\Mink\Element\NodeElement;
/**
* CmsUiContext