@@ -49,7 +49,7 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * Checks if current loader supports provided resource. |
| 51 | 51 | * |
| 52 | - * @param mixed $path Resource to load |
|
| 52 | + * @param string $path Resource to load |
|
| 53 | 53 | * |
| 54 | 54 | * @return Boolean |
| 55 | 55 | */ |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * Checks if current loader supports provided resource. |
| 51 | 51 | * |
| 52 | - * @param mixed $path Resource to load |
|
| 52 | + * @param string $path Resource to load |
|
| 53 | 53 | * |
| 54 | 54 | * @return Boolean |
| 55 | 55 | */ |
@@ -14,8 +14,16 @@ |
||
| 14 | 14 | |
| 15 | 15 | abstract class KeywordsTest extends TestCase |
| 16 | 16 | { |
| 17 | + /** |
|
| 18 | + * @return \Behat\Gherkin\Keywords\KeywordsInterface |
|
| 19 | + */ |
|
| 17 | 20 | abstract protected function getKeywords(); |
| 18 | 21 | abstract protected function getKeywordsArray(); |
| 22 | + |
|
| 23 | + /** |
|
| 24 | + * @param string $text |
|
| 25 | + * @param string $keywordType |
|
| 26 | + */ |
|
| 19 | 27 | abstract protected function getSteps($keywords, $text, &$line, $keywordType); |
| 20 | 28 | |
| 21 | 29 | public function translationTestDataProvider() |
@@ -121,6 +121,9 @@ discard block |
||
| 121 | 121 | return $this->yaml; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | + /** |
|
| 125 | + * @param string $fixture |
|
| 126 | + */ |
|
| 124 | 127 | protected function parseFixture($fixture) |
| 125 | 128 | { |
| 126 | 129 | $file = __DIR__ . '/Fixtures/features/' . $fixture; |
@@ -128,6 +131,9 @@ discard block |
||
| 128 | 131 | return array($this->getGherkinParser()->parse(file_get_contents($file), $file)); |
| 129 | 132 | } |
| 130 | 133 | |
| 134 | + /** |
|
| 135 | + * @param string $etalon |
|
| 136 | + */ |
|
| 131 | 137 | protected function parseEtalon($etalon) |
| 132 | 138 | { |
| 133 | 139 | $features = $this->getYamlParser()->load(__DIR__ . '/Fixtures/etalons/' . $etalon); |
@@ -153,24 +153,4 @@ |
||
| 153 | 153 | $parser = token(string('Foo')); |
| 154 | 154 | $expected = 'Foo'; |
| 155 | 155 | |
| 156 | - $this->assertParses($input, $parser, $expected); |
|
| 157 | - } |
|
| 158 | -} |
|
| 159 | - |
|
| 160 | -/* |
|
| 161 | -Feature: This thing |
|
| 162 | - |
|
| 163 | - This feature will be super awesome |
|
| 164 | - |
|
| 165 | - Example: Example text |
|
| 166 | - Given I have a cat when it's raining |
|
| 167 | - When I kill the cat |
|
| 168 | - Then I no longer have the cat |
|
| 169 | - |
|
| 170 | -FeatureKeyword: FeatureTitle |
|
| 171 | - |
|
| 172 | - ScenarioKeyword: ScenarioTitle |
|
| 173 | - StepKeyword StepText |
|
| 174 | - StepKeyword StepText |
|
| 175 | - StepKeyword StepText |
|
| 176 | - */ |
|
| 156 | + $this->assertParses($input, $parser, $expected |
|
| 177 | 157 | \ No newline at end of file |
@@ -153,24 +153,4 @@ |
||
| 153 | 153 | $parser = token(string('Foo')); |
| 154 | 154 | $expected = 'Foo'; |
| 155 | 155 | |
| 156 | - $this->assertParses($input, $parser, $expected); |
|
| 157 | - } |
|
| 158 | -} |
|
| 159 | - |
|
| 160 | -/* |
|
| 161 | -Feature: This thing |
|
| 162 | - |
|
| 163 | - This feature will be super awesome |
|
| 164 | - |
|
| 165 | - Example: Example text |
|
| 166 | - Given I have a cat when it's raining |
|
| 167 | - When I kill the cat |
|
| 168 | - Then I no longer have the cat |
|
| 169 | - |
|
| 170 | -FeatureKeyword: FeatureTitle |
|
| 171 | - |
|
| 172 | - ScenarioKeyword: ScenarioTitle |
|
| 173 | - StepKeyword StepText |
|
| 174 | - StepKeyword StepText |
|
| 175 | - StepKeyword StepText |
|
| 176 | - */ |
|
| 156 | + $this->assertParses($input, $parser, $expected |
|
| 177 | 157 | \ No newline at end of file |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Tests\Behat\Parsica; |
| 5 | 5 | |
| 6 | -use Behat\Gherkin\Parsica\Asserts; |
|
| 7 | 6 | use Behat\Parsica; |
| 8 | 7 | use PHPUnit\Framework\TestCase; |
| 9 | 8 | use Verraes\Parsica\PHPUnit\ParserAssertions; |