mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Remove Behat-related code dependant on PHPUnit 3.x
We've upgraded SilverStripe core to PHPUnit 4.x now, and the Functions.php has moved locations. Since all custom contexts either use one of these contexts, or extend off SilverStripeContext, we can be certain that the required assertions are automatically included for custom contexts, no need to duplicate the require_once() calls. Note that Behat 3.x suggests using static methods on a class, e.g. PHPUnit_Framework_Assert::assertSame (see http://docs.behat.org/en/master/quick_intro.html). This seems quite verbose, and increases the upgrade burden on any project using Behat.
This commit is contained in:
parent
4010d987f9
commit
350392148f
@ -153,10 +153,6 @@ use SilverStripe\BehatExtension\Context\SilverStripeContext,
|
|||||||
SilverStripe\Framework\Test\Behaviour\CmsUiContext,
|
SilverStripe\Framework\Test\Behaviour\CmsUiContext,
|
||||||
SilverStripe\Cms\Test\Behaviour;
|
SilverStripe\Cms\Test\Behaviour;
|
||||||
|
|
||||||
// PHPUnit
|
|
||||||
require_once 'PHPUnit/Autoload.php';
|
|
||||||
require_once 'PHPUnit/Framework/Assert/Functions.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Features context
|
* Features context
|
||||||
*
|
*
|
||||||
|
@ -13,8 +13,7 @@ use Behat\Gherkin\Node\PyStringNode,
|
|||||||
Behat\Gherkin\Node\TableNode;
|
Behat\Gherkin\Node\TableNode;
|
||||||
|
|
||||||
// PHPUnit
|
// PHPUnit
|
||||||
require_once 'PHPUnit/Autoload.php';
|
require_once BASE_PATH . '/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
|
||||||
require_once 'PHPUnit/Framework/Assert/Functions.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BasicContext
|
* BasicContext
|
||||||
|
@ -14,8 +14,7 @@ Behat\Gherkin\Node\TableNode;
|
|||||||
use Symfony\Component\DomCrawler\Crawler;
|
use Symfony\Component\DomCrawler\Crawler;
|
||||||
|
|
||||||
// PHPUnit
|
// PHPUnit
|
||||||
require_once 'PHPUnit/Autoload.php';
|
require_once BASE_PATH . '/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
|
||||||
require_once 'PHPUnit/Framework/Assert/Functions.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context used to define steps related to email sending.
|
* Context used to define steps related to email sending.
|
||||||
|
@ -9,8 +9,7 @@ use Behat\Behat\Context\BehatContext,
|
|||||||
SilverStripe\Filesystem\Storage\AssetStore;
|
SilverStripe\Filesystem\Storage\AssetStore;
|
||||||
|
|
||||||
// PHPUnit
|
// PHPUnit
|
||||||
require_once 'PHPUnit/Autoload.php';
|
require_once BASE_PATH . '/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
|
||||||
require_once 'PHPUnit/Framework/Assert/Functions.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context used to create fixtures in the SilverStripe ORM.
|
* Context used to create fixtures in the SilverStripe ORM.
|
||||||
|
@ -11,8 +11,7 @@ use Behat\Gherkin\Node\PyStringNode,
|
|||||||
Behat\Gherkin\Node\TableNode;
|
Behat\Gherkin\Node\TableNode;
|
||||||
|
|
||||||
// PHPUnit
|
// PHPUnit
|
||||||
require_once 'PHPUnit/Autoload.php';
|
require_once BASE_PATH . '/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
|
||||||
require_once 'PHPUnit/Framework/Assert/Functions.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LoginContext
|
* LoginContext
|
||||||
|
@ -20,6 +20,8 @@ use Symfony\Component\Yaml\Yaml;
|
|||||||
// Mink etc.
|
// Mink etc.
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
|
require_once BASE_PATH . '/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SilverStripeContext
|
* SilverStripeContext
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user