File tree Expand file tree Collapse file tree
src/Codeception/Test/Loader Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 "ext-curl" : " *" ,
2020 "ext-json" : " *" ,
2121 "ext-mbstring" : " *" ,
22- "behat/gherkin" : " ^4.6.2 " ,
22+ "behat/gherkin" : " ^4.12 " ,
2323 "codeception/lib-asserts" : " ^2.0" ,
2424 "codeception/stub" : " ^4.1" ,
2525 "phpunit/phpunit" : " ^9.5.20 || ^10.0 || ^11.0 || ^12.0" ,
Original file line number Diff line number Diff line change 55namespace Codeception \Test \Loader ;
66
77use Behat \Gherkin \Filter \RoleFilter ;
8- use Behat \Gherkin \Keywords \ArrayKeywords as GherkinKeywords ;
8+ use Behat \Gherkin \Keywords \CachedArrayKeywords as GherkinKeywords ;
99use Behat \Gherkin \Lexer as GherkinLexer ;
1010use Behat \Gherkin \Node \ExampleNode ;
1111use Behat \Gherkin \Node \FeatureNode ;
2424use function array_map ;
2525use function array_merge ;
2626use function class_exists ;
27- use function dirname ;
2827use function file_get_contents ;
2928use function get_class_methods ;
3029use function glob ;
@@ -72,10 +71,7 @@ public function __construct(array $settings = [])
7271 if (!class_exists (GherkinKeywords::class)) {
7372 throw new TestParseException ('Feature file can only be parsed with Behat\Gherkin library. Please install `behat/gherkin` with Composer ' );
7473 }
75- $ gherkin = new ReflectionClass (\Behat \Gherkin \Gherkin::class);
76- $ gherkinClassPath = dirname ($ gherkin ->getFileName ());
77- $ i18n = require $ gherkinClassPath . '/../../../i18n.php ' ;
78- $ keywords = new GherkinKeywords ($ i18n );
74+ $ keywords = GherkinKeywords::withDefaultKeywords ();
7975 $ lexer = new GherkinLexer ($ keywords );
8076 $ this ->parser = new GherkinParser ($ lexer );
8177 $ this ->fetchGherkinSteps ();
You can’t perform that action at this time.
0 commit comments