@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * Copied logic from Core.php, because it needs to be executed prior to {@link SilverStripeAwareInitializer}. |
| 59 | 59 | * |
| 60 | 60 | * @param String Absolute start path to search upwards from |
| 61 | - * @return Boolean Absolute path to environment file |
|
| 61 | + * @return string|null Absolute path to environment file |
|
| 62 | 62 | */ |
| 63 | 63 | protected function findEnvironmentConfigFile($path) { |
| 64 | 64 | $envPath = null; |
@@ -85,6 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @param String Absolute start path to search upwards from |
| 87 | 87 | * @param Array Map of paths to host names |
| 88 | + * @param string $path |
|
| 88 | 89 | * @return String URL |
| 89 | 90 | */ |
| 90 | 91 | protected function findBaseUrlFromMapping($path, $mapping) { |
@@ -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. |
@@ -2,13 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Console\Processor; |
| 4 | 4 | |
| 5 | -use Symfony\Component\DependencyInjection\ContainerInterface, |
|
| 6 | - Symfony\Component\Console\Command\Command, |
|
| 7 | - Symfony\Component\Console\Input\InputArgument, |
|
| 8 | - Symfony\Component\Console\Input\InputInterface, |
|
| 9 | - Symfony\Component\Console\Output\OutputInterface, |
|
| 10 | - Symfony\Component\Console\Input\InputOption; |
|
| 11 | - |
|
| 5 | +use Symfony\Component\DependencyInjection\ContainerInterface; |
|
| 6 | +use Symfony\Component\Console\Command\Command; |
|
| 7 | +use Symfony\Component\Console\Input\InputInterface; |
|
| 8 | +use Symfony\Component\Console\Output\OutputInterface; |
|
| 9 | +use Symfony\Component\Console\Input\InputOption; |
|
| 12 | 10 | use Behat\Behat\Console\Processor\InitProcessor as BaseProcessor; |
| 13 | 11 | |
| 14 | 12 | /** |
@@ -2,12 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Console\Processor; |
| 4 | 4 | |
| 5 | -use Symfony\Component\DependencyInjection\ContainerInterface, |
|
| 6 | - Symfony\Component\Console\Command\Command, |
|
| 7 | - Symfony\Component\Console\Input\InputArgument, |
|
| 8 | - Symfony\Component\Console\Input\InputInterface, |
|
| 9 | - Symfony\Component\Console\Output\OutputInterface; |
|
| 10 | - |
|
| 5 | +use Symfony\Component\DependencyInjection\ContainerInterface; |
|
| 6 | +use Symfony\Component\Console\Command\Command; |
|
| 7 | +use Symfony\Component\Console\Input\InputArgument; |
|
| 8 | +use Symfony\Component\Console\Input\InputInterface; |
|
| 9 | +use Symfony\Component\Console\Output\OutputInterface; |
|
| 11 | 10 | use Behat\Behat\Console\Processor\LocatorProcessor as BaseProcessor; |
| 12 | 11 | |
| 13 | 12 | /** |
@@ -750,7 +750,7 @@ discard block |
||
| 750 | 750 | * - fieldset[data-name] table |
| 751 | 751 | * - table caption |
| 752 | 752 | * |
| 753 | - * @return Behat\Mink\Element\NodeElement |
|
| 753 | + * @return \Behat\Mink\Element\NodeElement|null |
|
| 754 | 754 | */ |
| 755 | 755 | protected function getTable($selector) { |
| 756 | 756 | $selector = $this->getSession()->getSelectorsHandler()->xpathLiteral($selector); |
@@ -971,6 +971,7 @@ discard block |
||
| 971 | 971 | |
| 972 | 972 | /** |
| 973 | 973 | * We have to catch exceptions and log somehow else otherwise behat falls over |
| 974 | + * @param \WebDriver\Exception $e |
|
| 974 | 975 | */ |
| 975 | 976 | protected function logException($e){ |
| 976 | 977 | file_put_contents('php://stderr', 'Exception caught: '.$e); |
@@ -2,16 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Context; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\BehatContext, |
|
| 6 | - Behat\Behat\Context\Step, |
|
| 7 | - Behat\Behat\Event\StepEvent, |
|
| 8 | - Behat\Behat\Event\ScenarioEvent; |
|
| 9 | - |
|
| 5 | +use Behat\Behat\Context\BehatContext; |
|
| 6 | +use Behat\Behat\Context\Step; |
|
| 7 | +use Behat\Behat\Event\StepEvent; |
|
| 8 | +use Behat\Behat\Event\ScenarioEvent; |
|
| 10 | 9 | use Behat\Mink\Driver\Selenium2Driver; |
| 11 | 10 | |
| 12 | -use Behat\Gherkin\Node\PyStringNode, |
|
| 13 | - Behat\Gherkin\Node\TableNode; |
|
| 14 | - |
|
| 15 | 11 | // PHPUnit |
| 16 | 12 | require_once 'PHPUnit/Autoload.php'; |
| 17 | 13 | require_once 'PHPUnit/Framework/Assert/Functions.php'; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | /** |
| 29 | 29 | * Sets bundle namespace to use for guessing. |
| 30 | 30 | * |
| 31 | - * @param string $namespace |
|
| 31 | + * @param string $namespaceBase |
|
| 32 | 32 | */ |
| 33 | 33 | public function setNamespaceBase($namespaceBase) |
| 34 | 34 | { |
@@ -2,15 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Context; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\ClosuredContextInterface, |
|
| 6 | -Behat\Behat\Context\TranslatedContextInterface, |
|
| 7 | -Behat\Behat\Context\BehatContext, |
|
| 8 | -Behat\Behat\Context\Step, |
|
| 9 | -Behat\Behat\Event\FeatureEvent, |
|
| 10 | -Behat\Behat\Event\ScenarioEvent, |
|
| 11 | -Behat\Behat\Exception\PendingException; |
|
| 12 | -use Behat\Gherkin\Node\PyStringNode, |
|
| 13 | -Behat\Gherkin\Node\TableNode; |
|
| 5 | +use Behat\Behat\Context\BehatContext; |
|
| 6 | +use Behat\Behat\Context\Step; |
|
| 7 | +use Behat\Behat\Event\ScenarioEvent; |
|
| 8 | +use Behat\Gherkin\Node\TableNode; |
|
| 14 | 9 | use Symfony\Component\DomCrawler\Crawler; |
| 15 | 10 | |
| 16 | 11 | // PHPUnit |
@@ -545,6 +545,10 @@ discard block |
||
| 545 | 545 | return $data; |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | + /** |
|
| 549 | + * @param string $class |
|
| 550 | + * @param string $identifier |
|
| 551 | + */ |
|
| 548 | 552 | protected function prepareAsset($class, $identifier, $data = null) { |
| 549 | 553 | if(!$data) $data = array(); |
| 550 | 554 | $relativeTargetPath = (isset($data['Filename'])) ? $data['Filename'] : $identifier; |
@@ -609,6 +613,7 @@ discard block |
||
| 609 | 613 | * |
| 610 | 614 | * @param String Class name |
| 611 | 615 | * @param Array Map of field names or aliases to their values. |
| 616 | + * @param string $class |
|
| 612 | 617 | * @return Array Map of actual object properties to their values. |
| 613 | 618 | */ |
| 614 | 619 | protected function convertFields($class, $fields) { |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Context; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\BehatContext, |
|
| 6 | - Behat\Behat\Event\ScenarioEvent, |
|
| 7 | - Behat\Gherkin\Node\PyStringNode, |
|
| 8 | - Behat\Gherkin\Node\TableNode, |
|
| 9 | - SilverStripe\Filesystem\Storage\AssetStore; |
|
| 5 | +use Behat\Behat\Context\BehatContext; |
|
| 6 | +use Behat\Behat\Event\ScenarioEvent; |
|
| 7 | +use Behat\Gherkin\Node\PyStringNode; |
|
| 8 | +use Behat\Gherkin\Node\TableNode; |
|
| 9 | +use SilverStripe\Filesystem\Storage\AssetStore; |
|
| 10 | 10 | |
| 11 | 11 | // PHPUnit |
| 12 | 12 | require_once 'PHPUnit/Autoload.php'; |
@@ -2,9 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Context\Initializer; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\Initializer\InitializerInterface, |
|
| 6 | -Behat\Behat\Context\ContextInterface; |
|
| 7 | - |
|
| 5 | +use Behat\Behat\Context\Initializer\InitializerInterface; |
|
| 6 | +use Behat\Behat\Context\ContextInterface; |
|
| 8 | 7 | use SilverStripe\BehatExtension\Context\SilverStripeAwareContextInterface; |
| 9 | 8 | |
| 10 | 9 | /* |
@@ -121,6 +121,8 @@ |
||
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | 123 | * @When /^I log in with "(?<username>[^"]*)" and "(?<password>[^"]*)"$/ |
| 124 | + * @param string $email |
|
| 125 | + * @param string $password |
|
| 124 | 126 | */ |
| 125 | 127 | public function stepILogInWith($email, $password) |
| 126 | 128 | { |
@@ -2,13 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\BehatExtension\Context; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\ClosuredContextInterface, |
|
| 6 | -Behat\Behat\Context\TranslatedContextInterface, |
|
| 7 | -Behat\Behat\Context\BehatContext, |
|
| 8 | -Behat\Behat\Context\Step, |
|
| 9 | -Behat\Behat\Exception\PendingException; |
|
| 10 | -use Behat\Gherkin\Node\PyStringNode, |
|
| 11 | -Behat\Gherkin\Node\TableNode; |
|
| 5 | +use Behat\Behat\Context\BehatContext; |
|
| 6 | +use Behat\Behat\Context\Step; |
|
| 12 | 7 | |
| 13 | 8 | // PHPUnit |
| 14 | 9 | require_once 'PHPUnit/Autoload.php'; |