Minor docs fixes

This commit is contained in:
Ingo Schommer 2012-12-07 01:11:30 +01:00
parent 9b5eaa30a5
commit f55029c4aa

View File

@ -47,7 +47,7 @@ And get the latest Selenium2 server (requires Java):
Alternatively, you can require this extension manually on an existing Composer project. Alternatively, you can require this extension manually on an existing Composer project.
Please note that we do require a Composer-based installation due to class autoloading concerns. Please note that we do require a Composer-based installation due to class autoloading concerns.
phar composer.phar require silverstripe/behat-extension:* composer require silverstripe/behat-extension:*
## Configuration ## Configuration
@ -95,15 +95,16 @@ Example: mymodule/tests/behat/features/bootstrap/MyModule/Test/Behaviour/Feature
### behat.yml ### behat.yml
Create a `behat.yml` file in the project root, and add the template below. The SilverStripe installer already comes with a YML configuration
which is ready to run tests on a locally hosted Selenium server.
TODO: Move to auto-loaded configuration You'll need to customize at least the `base_url` setting to match the URL where
the tested SilverStripe instance is hosted locally.
Example: behat.yml Example: behat.yml
default: default:
context: context:
class: SilverStripe\MyModule\Test\Behaviour\FeatureContext class: SilverStripe\MyModule\Test\Behaviour\FeatureContext
extensions: extensions:
SilverStripe\BehatExtension\Extension: ~ SilverStripe\BehatExtension\Extension: ~
Behat\MinkExtension\Extension: Behat\MinkExtension\Extension:
@ -115,8 +116,6 @@ Example: behat.yml
selenium2: selenium2:
browser: firefox browser: firefox
You'll need to customize at least the `base_url` setting to match the URL where
the tested SilverStripe instance is hosted locally.
Overview of settings (all in the `extensions.SilverStripe\BehatExtension\Extension` path): Overview of settings (all in the `extensions.SilverStripe\BehatExtension\Extension` path):
* `framework_path`: Path to the SilverStripe Framework folder. It supports both absolute and relative (to `behat.yml` file) paths. * `framework_path`: Path to the SilverStripe Framework folder. It supports both absolute and relative (to `behat.yml` file) paths.
@ -159,7 +158,7 @@ Selenium will also try to use chrome browser. Refer to `behat.yml` for details.
vendor/bin/behat @mymodule vendor/bin/behat @mymodule
# Run a specific feature test # Run a specific feature test
vendor/behat @mymodule/my-steps.feature vendor/bin/behat @mymodule/my-steps.feature
### Available Step Definitions ### Available Step Definitions
@ -245,6 +244,12 @@ could be `chrome`.
## FAQ ## FAQ
### FeatureContext not found
This is most likely a problem with Composer's autoloading generator.
Check that you have "SilverStripe" mentioned in the `vendor/composer/autoload_classmap.php` file,
and call `composer dump-autoload` if not.
### Why does the module need to know about the framework path on the filesystem? ### Why does the module need to know about the framework path on the filesystem?
Sometimes SilverStripe needs to know the URL of your site. When you're visiting Sometimes SilverStripe needs to know the URL of your site. When you're visiting