From 3ea48c8c6b302e0dcc7cce1bac3465ba69c53e38 Mon Sep 17 00:00:00 2001 From: KentR Date: Mon, 6 Feb 2017 17:08:52 -0800 Subject: [PATCH 1/2] Correct --init & -dl command For me, the instructions didn't work as-is. **Expected results:** Running `bin/behat --init` & `behat -dl` would display the list of tests as the instructions say. **Actual results:** `bin/behat -dl` returning nothing. --- doc/globalinstall.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/globalinstall.rst b/doc/globalinstall.rst index de233b2a..2d684321 100644 --- a/doc/globalinstall.rst +++ b/doc/globalinstall.rst @@ -83,9 +83,9 @@ Set up tests 3. Initialize behat. This creates the features folder with some basic things to get you started:: - bin/behat --init + bin/behat -c path/to/behat.yml --init -4. This will generate a FeatureContext.php file that looks like: +4. This will generate a FeatureContext.php file in `test-directory/features` that looks like: .. literalinclude:: _static/snippets/FeatureContext.php.inc :language: php @@ -95,7 +95,7 @@ Set up tests This will make your FeatureContext.php aware of both the Drupal Extension and the Mink Extension, so you'll be able to take advantage of their drivers and step definitions and add your own custom step definitions here. - The FeatureContext.php file must be in the same directory as your behat.yml + The `features/FeatureContext.php` file must be in the same directory as your behat.yml file otherwise in step 5 you will get the following error: [Behat\Behat\Context\Exception\ContextNotFoundException] @@ -104,7 +104,7 @@ Set up tests 5. To ensure everything is set up appropriately, type:: - behat -dl + behat -c path/to/behat.yml -dl You'll see a list of steps like the following, but longer, if you've installed everything successfully: From ec528ab6f0fe765faffe328c84a0cff648895172 Mon Sep 17 00:00:00 2001 From: KentR Date: Tue, 7 Feb 2017 10:08:54 -0800 Subject: [PATCH 2/2] correct paths per request How's this? Behat is new to me, so I have only knowledge of what I encountered when I attempted to follow the installation instructions. Wasn't sure what to do about the file path in this text: _"The `features/FeatureContext.php` file must be in the same directory as your `behat.yml`"_ --- doc/globalinstall.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/globalinstall.rst b/doc/globalinstall.rst index 2d684321..ace17f05 100644 --- a/doc/globalinstall.rst +++ b/doc/globalinstall.rst @@ -83,9 +83,9 @@ Set up tests 3. Initialize behat. This creates the features folder with some basic things to get you started:: - bin/behat -c path/to/behat.yml --init + bin/behat -c sites/default/behat-tests/behat.yml --init -4. This will generate a FeatureContext.php file in `test-directory/features` that looks like: +4. This will generate a `sites/default/behat-tests/features/FeatureContext.php` file that looks like: .. literalinclude:: _static/snippets/FeatureContext.php.inc :language: php @@ -95,7 +95,7 @@ Set up tests This will make your FeatureContext.php aware of both the Drupal Extension and the Mink Extension, so you'll be able to take advantage of their drivers and step definitions and add your own custom step definitions here. - The `features/FeatureContext.php` file must be in the same directory as your behat.yml + The `features/FeatureContext.php` file must be in the same directory as your `behat.yml` file otherwise in step 5 you will get the following error: [Behat\Behat\Context\Exception\ContextNotFoundException] @@ -104,7 +104,7 @@ Set up tests 5. To ensure everything is set up appropriately, type:: - behat -c path/to/behat.yml -dl + behat -c sites/default/behat-tests/behat.yml -dl You'll see a list of steps like the following, but longer, if you've installed everything successfully: