mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Convert behat PHP to SS coding conventions
This commit is contained in:
parent
c3b7afbdb1
commit
34c8fb22cb
@ -20,16 +20,15 @@ require_once 'PHPUnit/Framework/Assert/Functions.php';
|
|||||||
* Context automatically loaded by Behat.
|
* Context automatically loaded by Behat.
|
||||||
* Uses subcontexts to extend functionality.
|
* Uses subcontexts to extend functionality.
|
||||||
*/
|
*/
|
||||||
class FeatureContext extends \SilverStripe\Framework\Test\Behaviour\FeatureContext
|
class FeatureContext extends \SilverStripe\Framework\Test\Behaviour\FeatureContext {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Initializes context.
|
* Initializes context.
|
||||||
* Every scenario gets it's own context object.
|
* Every scenario gets it's own context object.
|
||||||
*
|
*
|
||||||
* @param array $parameters context parameters (set them up through behat.yml)
|
* @param array $parameters context parameters (set them up through behat.yml)
|
||||||
*/
|
*/
|
||||||
public function __construct(array $parameters)
|
public function __construct(array $parameters) {
|
||||||
{
|
|
||||||
parent::__construct($parameters);
|
parent::__construct($parameters);
|
||||||
|
|
||||||
// Override existing fixture context with more specific one
|
// Override existing fixture context with more specific one
|
||||||
|
@ -19,8 +19,7 @@ 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.
|
||||||
*/
|
*/
|
||||||
class FixtureContext extends \SilverStripe\BehatExtension\Context\FixtureContext
|
class FixtureContext extends \SilverStripe\BehatExtension\Context\FixtureContext {
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find or create a redirector page and link to another existing page.
|
* Find or create a redirector page and link to another existing page.
|
||||||
@ -28,8 +27,7 @@ class FixtureContext extends \SilverStripe\BehatExtension\Context\FixtureContext
|
|||||||
*
|
*
|
||||||
* @Given /^(?:(an|a|the) )"(?<type>[^"]+)" "(?<id>[^"]+)" (:?which )?redirects to (?:(an|a|the) )"(?<targetType>[^"]+)" "(?<targetId>[^"]+)"$/
|
* @Given /^(?:(an|a|the) )"(?<type>[^"]+)" "(?<id>[^"]+)" (:?which )?redirects to (?:(an|a|the) )"(?<targetType>[^"]+)" "(?<targetId>[^"]+)"$/
|
||||||
*/
|
*/
|
||||||
public function stepCreateRedirectorPage($type, $id, $targetType, $targetId)
|
public function stepCreateRedirectorPage($type, $id, $targetType, $targetId) {
|
||||||
{
|
|
||||||
$class = 'RedirectorPage';
|
$class = 'RedirectorPage';
|
||||||
$targetClass = $this->convertTypeToClass($targetType);
|
$targetClass = $this->convertTypeToClass($targetType);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user