Completed
Pull Request — master (#105)
by
unknown
08:51
created
src/SilverStripe/BehatExtension/Context/SilverStripeContext.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Unused Use Statements   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,21 +2,15 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/SilverStripe/BehatExtension/Extension.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-     * @return array
67
+     * @return Compiler\CoreInitializationPass[]
68 68
      */
69 69
     public function getCompilerPasses()
70 70
     {
Please login to merge, or discard this patch.
Unused Use Statements   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,11 +2,10 @@
 block discarded – undo
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
 /*
Please login to merge, or discard this patch.
src/SilverStripe/BehatExtension/Compiler/CoreInitializationPass.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
appendixes/mysite/code/testing/FakeDatabase.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -82,6 +82,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
appendixes/mysite/code/testing/SampleFakeManager.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -97,6 +97,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
appendixes/mysite/tests/behat/features/bootstrap/Context/FeatureContext.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     }
75 75
 
76 76
     /**
77
-     * @return FixtureFactory
77
+     * @return \FixtureFactory
78 78
      */
79 79
     public function getFixtureFactory() {
80 80
         if(!$this->fixtureFactory) {
Please login to merge, or discard this patch.
Unused Use Statements   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.