@@ -134,7 +134,7 @@ |
||
134 | 134 | * When using the "data-title" attribute, ensure not to include double quotes. |
135 | 135 | * |
136 | 136 | * @param String $region Region name or CSS selector |
137 | - * @return MinkElement|null |
|
137 | + * @return \Behat\Mink\Element\NodeElement |
|
138 | 138 | */ |
139 | 139 | public function getRegionObj($region) { |
140 | 140 | // Try to find regions directly by CSS selector. |
@@ -2,21 +2,15 @@ |
||
2 | 2 | |
3 | 3 | namespace SilverStripe\BehatExtension\Context; |
4 | 4 | |
5 | -use Behat\Behat\Context\Step, |
|
6 | - Behat\Behat\Event\FeatureEvent, |
|
7 | - Behat\Behat\Event\ScenarioEvent, |
|
8 | - Behat\Behat\Event\SuiteEvent; |
|
9 | -use Behat\Gherkin\Node\PyStringNode; |
|
5 | +use Behat\Behat\Context\Step; |
|
6 | +use Behat\Behat\Event\ScenarioEvent; |
|
10 | 7 | use Behat\MinkExtension\Context\MinkContext; |
11 | -use Behat\Mink\Driver\GoutteDriver, |
|
12 | - Behat\Mink\Driver\Selenium2Driver, |
|
13 | - Behat\Mink\Exception\UnsupportedDriverActionException, |
|
14 | - Behat\Mink\Exception\ElementNotFoundException; |
|
15 | - |
|
8 | +use Behat\Mink\Driver\GoutteDriver; |
|
9 | +use Behat\Mink\Driver\Selenium2Driver; |
|
10 | +use Behat\Mink\Exception\UnsupportedDriverActionException; |
|
11 | +use Behat\Mink\Exception\ElementNotFoundException; |
|
16 | 12 | use SilverStripe\BehatExtension\Context\SilverStripeAwareContextInterface; |
17 | 13 | |
18 | -use Symfony\Component\Yaml\Yaml; |
|
19 | - |
|
20 | 14 | // Mink etc. |
21 | 15 | require_once 'vendor/autoload.php'; |
22 | 16 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | - * @return array |
|
67 | + * @return Compiler\CoreInitializationPass[] |
|
68 | 68 | */ |
69 | 69 | public function getCompilerPasses() |
70 | 70 | { |
@@ -2,11 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace SilverStripe\BehatExtension; |
4 | 4 | |
5 | -use Symfony\Component\Config\FileLocator, |
|
6 | - Symfony\Component\DependencyInjection\ContainerBuilder, |
|
7 | - Symfony\Component\DependencyInjection\Loader\YamlFileLoader, |
|
8 | - Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
|
9 | - |
|
5 | +use Symfony\Component\Config\FileLocator; |
|
6 | +use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
7 | +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
|
8 | +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
|
10 | 9 | use Behat\Behat\Extension\ExtensionInterface; |
11 | 10 | |
12 | 11 | /* |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace SilverStripe\BehatExtension\Compiler; |
4 | 4 | |
5 | -use Symfony\Component\DependencyInjection\ContainerBuilder, |
|
6 | - Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
|
5 | +use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
6 | +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * Behat\SilverStripe container compilation pass. |
@@ -82,6 +82,10 @@ |
||
82 | 82 | return $return; |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param string $type |
|
87 | + * @param string $key |
|
88 | + */ |
|
85 | 89 | public function get($type, $key) { |
86 | 90 | $data = $this->getData(); |
87 | 91 | $return = (isset($data[$type][$key])) ? FakeObject::create_from_array($data[$type][$key]) : null; |
@@ -97,6 +97,9 @@ discard block |
||
97 | 97 | // Don't initialize client |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param FakeDatabase $db |
|
102 | + */ |
|
100 | 103 | public function setDb($db) { |
101 | 104 | $this->db = $db; |
102 | 105 | } |
@@ -126,6 +129,9 @@ discard block |
||
126 | 129 | // Don't initialize client |
127 | 130 | } |
128 | 131 | |
132 | + /** |
|
133 | + * @param FakeDatabase $db |
|
134 | + */ |
|
129 | 135 | public function setDb($db) { |
130 | 136 | $this->db = $db; |
131 | 137 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * @return FixtureFactory |
|
77 | + * @return \FixtureFactory |
|
78 | 78 | */ |
79 | 79 | public function getFixtureFactory() { |
80 | 80 | if(!$this->fixtureFactory) { |
@@ -2,13 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace Mysite\Test\Behaviour; |
4 | 4 | |
5 | -use SilverStripe\BehatExtension\Context\SilverStripeContext, |
|
6 | - SilverStripe\BehatExtension\Context\BasicContext, |
|
7 | - SilverStripe\BehatExtension\Context\LoginContext, |
|
8 | - SilverStripe\BehatExtension\Context\FixtureContext, |
|
9 | - SilverStripe\Framework\Test\Behaviour\CmsFormsContext, |
|
10 | - SilverStripe\Framework\Test\Behaviour\CmsUiContext, |
|
11 | - SilverStripe\Cms\Test\Behaviour; |
|
5 | +use SilverStripe\BehatExtension\Context\SilverStripeContext; |
|
6 | +use SilverStripe\BehatExtension\Context\BasicContext; |
|
7 | +use SilverStripe\BehatExtension\Context\LoginContext; |
|
8 | +use SilverStripe\BehatExtension\Context\FixtureContext; |
|
9 | +use SilverStripe\Framework\Test\Behaviour\CmsFormsContext; |
|
10 | +use SilverStripe\Framework\Test\Behaviour\CmsUiContext; |
|
11 | +use SilverStripe\Cms\Test\Behaviour; |
|
12 | 12 | |
13 | 13 | // PHPUnit |
14 | 14 | require_once 'PHPUnit/Autoload.php'; |