@@ -2,9 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Siteconfig\Test\Behaviour; |
| 4 | 4 | |
| 5 | -use SilverStripe\BehatExtension\Context\SilverStripeContext; |
|
| 6 | -use SilverStripe\BehatExtension\Context\BasicContext; |
|
| 7 | -use SilverStripe\BehatExtension\Context\LoginContext; |
|
| 8 | 5 | use SilverStripe\BehatExtension\Context\FixtureContext; |
| 9 | 6 | use SilverStripe\Cms\Test\Behaviour; |
| 10 | 7 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | // Add extra contexts with more steps |
| 35 | 35 | $this->useContext('ThemeContext', new \SilverStripe\Siteconfig\Test\Behaviour\ThemeContext($parameters)); |
| 36 | - if(!class_exists('SiteTree')) { |
|
| 36 | + if (!class_exists('SiteTree')) { |
|
| 37 | 37 | return; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $factory = $fixtureContext->getFixtureFactory(); |
| 42 | 42 | foreach (\ClassInfo::subclassesFor('SiteTree') as $id => $class) { |
| 43 | 43 | $blueprint = \Injector::inst()->create('FixtureBlueprint', $class); |
| 44 | - $blueprint->addCallback('afterCreate', function ($obj, $identifier, &$data, &$fixtures) { |
|
| 44 | + $blueprint->addCallback('afterCreate', function($obj, $identifier, &$data, &$fixtures) { |
|
| 45 | 45 | $obj->publish('Stage', 'Live'); |
| 46 | 46 | }); |
| 47 | 47 | $factory->define($class, $blueprint); |
@@ -2,15 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Siteconfig\Test\Behaviour; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\ClosuredContextInterface; |
|
| 6 | -use Behat\Behat\Context\TranslatedContextInterface; |
|
| 7 | 5 | use Behat\Behat\Context\BehatContext; |
| 8 | -use Behat\Behat\Context\Step; |
|
| 9 | -use Behat\Behat\Event\StepEvent; |
|
| 10 | -use Behat\Behat\Exception\PendingException; |
|
| 11 | -use Behat\Mink\Driver\Selenium2Driver; |
|
| 12 | -use Behat\Gherkin\Node\PyStringNode; |
|
| 13 | -use Behat\Gherkin\Node\TableNode; |
|
| 14 | 6 | |
| 15 | 7 | /** |
| 16 | 8 | * Context used to create fixtures in the SilverStripe ORM. |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | public function getAvailableThemes($baseDir = null) |
| 166 | 166 | { |
| 167 | 167 | $themes = SSViewer::get_themes($baseDir); |
| 168 | - $disabled = (array)$this->config()->disabled_themes; |
|
| 168 | + $disabled = (array) $this->config()->disabled_themes; |
|
| 169 | 169 | |
| 170 | 170 | foreach ($disabled as $theme) { |
| 171 | 171 | if (isset($themes[$theme])) { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | )->setHTMLID('Form_EditForm'); |
| 71 | 71 | $form->setValidationResponseCallback(function() use ($negotiator, $form) { |
| 72 | 72 | $request = $this->getRequest(); |
| 73 | - if($request->isAjax() && $negotiator) { |
|
| 73 | + if ($request->isAjax() && $negotiator) { |
|
| 74 | 74 | $form->setupFormErrors(); |
| 75 | 75 | $result = $form->forTemplate(); |
| 76 | 76 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | try { |
| 130 | 130 | $siteConfig->write(); |
| 131 | - } catch(ValidationException $ex) { |
|
| 131 | + } catch (ValidationException $ex) { |
|
| 132 | 132 | $form->sessionMessage($ex->getResult()->message(), 'bad'); |
| 133 | 133 | return $this->getResponseNegotiator()->respond($this->request); |
| 134 | 134 | } |