Convert behat PHP to SS coding conventions

This commit is contained in:
Ingo Schommer 2013-11-15 11:44:56 +01:00
parent c3b7afbdb1
commit 34c8fb22cb
2 changed files with 63 additions and 66 deletions

View File

@ -20,16 +20,15 @@ require_once 'PHPUnit/Framework/Assert/Functions.php';
* Context automatically loaded by Behat.
* Uses subcontexts to extend functionality.
*/
class FeatureContext extends \SilverStripe\Framework\Test\Behaviour\FeatureContext
{
class FeatureContext extends \SilverStripe\Framework\Test\Behaviour\FeatureContext {
/**
* Initializes context.
* Every scenario gets it's own context object.
*
* @param array $parameters context parameters (set them up through behat.yml)
*/
public function __construct(array $parameters)
{
public function __construct(array $parameters) {
parent::__construct($parameters);
// Override existing fixture context with more specific one

View File

@ -19,8 +19,7 @@ require_once 'PHPUnit/Framework/Assert/Functions.php';
/**
* 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.
@ -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>[^"]+)"$/
*/
public function stepCreateRedirectorPage($type, $id, $targetType, $targetId)
{
public function stepCreateRedirectorPage($type, $id, $targetType, $targetId) {
$class = 'RedirectorPage';
$targetClass = $this->convertTypeToClass($targetType);