Skip to content

Commit

Permalink
Merge pull request #19 from tractorcow/pulls/4.0/fix-ci
Browse files Browse the repository at this point in the history
BUG Fix tests
  • Loading branch information
dhensby committed Jan 26, 2016
2 parents cd306ec + ed76b3f commit 7597ed6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ before_script:
- composer self-update || true
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
- "if [ \"$BEHAT_TEST\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
- "if [ \"$BEHAT_TEST\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/behat-extension; fi"
- "if [ \"$BEHAT_TEST\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/behat-extension,silverstripe/cms; fi"
- cd ~/builds/ss
- composer install
- php ~/travis-support/travis_setup_selenium.php --if-env BEHAT_TEST
- php ~/travis-support/travis_setup_php54_webserver.php --if-env BEHAT_TEST

script:
- "if [ \"$BEHAT_TEST\" = \"\" ]; then vendor/bin/phpunit siteconfig/tests; fi"
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/behat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default:
context:
class: SilverStripe\Cms\Test\Behaviour\FeatureContext
class: SilverStripe\Siteconfig\Test\Behaviour\FeatureContext
extensions:
SilverStripe\BehatExtension\Extension: ~
Behat\MinkExtension\Extension:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace SilverStripe\Cms\Test\Behaviour;
namespace SilverStripe\Siteconfig\Test\Behaviour;

use SilverStripe\BehatExtension\Context\SilverStripeContext;
use SilverStripe\BehatExtension\Context\BasicContext;
Expand Down Expand Up @@ -33,12 +33,15 @@ public function __construct(array $parameters)
parent::__construct($parameters);

// Override existing fixture context with more specific one
$fixtureContext = new \SilverStripe\Cms\Test\Behaviour\FixtureContext($parameters);
$fixtureContext = new \SilverStripe\Siteconfig\Test\Behaviour\FixtureContext($parameters);
$fixtureContext->setFixtureFactory($this->getFixtureFactory());
$this->useContext('FixtureContext', $fixtureContext);

// Add extra contexts with more steps
$this->useContext('ThemeContext', new \SilverStripe\Cms\Test\Behaviour\ThemeContext($parameters));
$this->useContext('ThemeContext', new \SilverStripe\Siteconfig\Test\Behaviour\ThemeContext($parameters));
if(!class_exists('SiteTree')) {
return;
}

// Use blueprints which auto-publish all subclasses of SiteTree
$factory = $fixtureContext->getFixtureFactory();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace SilverStripe\Cms\Test\Behaviour;
namespace SilverStripe\Siteconfig\Test\Behaviour;

use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace SilverStripe\Cms\Test\Behaviour;
namespace SilverStripe\Siteconfig\Test\Behaviour;

use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
Expand Down

0 comments on commit 7597ed6

Please sign in to comment.