@@ -12,9 +12,9 @@ Symfony2Extension provides:
1212 instance for your contexts
1313* Additional ``symfony2 `` session for Mink (if ``MinkExtension `` is used)
1414
15- Symfony2Extension is here to replace obsolete BehatBundle. To migrate
15+ Symfony2Extension is here to replace the obsolete BehatBundle. To migrate
1616your Behat 2.3 + Symfony2 feature suite,
17- `read migration guide </symfony2/migrating_from_2.3_to_2.4.html >`_.
17+ `read the migration guide </symfony2/migrating_from_2.3_to_2.4.html >`_.
1818
1919Installation
2020------------
@@ -127,11 +127,11 @@ The easiest way to keep your suite updated is to use `Composer <http://getcompos
127127Usage
128128-----
129129
130- After installing extension, there would be 2 usage options available for you :
130+ After installing the extension, there are 2 usage options available:
131131
132- 1. If you're on the php 5.4+, you can simply use
132+ 1. If you're using PHP 5.4+, you can simply use the
133133 ``Behat\Symfony2Extension\Context\KernelDictionary `` trait inside your
134- ``FeatureContext `` or any of its subcontexts. This trait will provide
134+ ``FeatureContext `` or any of its subcontexts. This trait will provide the
135135 ``getKernel() `` and ``getContainer() `` methods for you.
136136
1371372. Implementing ``Behat\Symfony2Extension\Context\KernelAwareInterface `` with
@@ -140,13 +140,13 @@ After installing extension, there would be 2 usage options available for you:
140140 parent contexts from subcontexts when the only thing you need is a kernel instance.
141141
142142There's a common thing between those 2 methods. In each of those, target context
143- will implement ``setKernel(KernelInterface $kernel) `` method. This method would be
143+ will implement the ``setKernel(KernelInterface $kernel) `` method. This method would be
144144automatically called **immediately after ** each context creation before each scenario.
145145After context constructor, but before any instance hook or definition call.
146146
147147.. note ::
148148
149- Application kernel will be automatically rebooted between scenarios, so your
149+ The application kernel will be automatically rebooted between scenarios, so your
150150 scenarios would have almost absolutely isolated state.
151151
152152Initialize Bundle Suite
@@ -156,11 +156,11 @@ In order to start with your feature suite for specific bundle, execute:
156156
157157.. code-block :: bash
158158
159- $ php behat.phar --init " @YouBundleName "
159+ $ php behat.phar --init " @YourBundleName "
160160
161161 .. note ::
162162
163- Extension provides alternative ways to specify bundle:
163+ The extension provides an alternative way to specify the bundle:
164164
165165 .. code-block :: bash
166166
@@ -169,23 +169,23 @@ In order to start with your feature suite for specific bundle, execute:
169169 Run Bundle Suite
170170~~~~~~~~~~~~~~~~
171171
172- In order to run feature suite of specific bundle, execute:
172+ In order to run the feature suite for a specific bundle, execute:
173173
174174.. code-block :: bash
175175
176- $ php behat.phar " @YouBundleName "
176+ $ php behat.phar " @YourBundleName "
177177
178178 .. note ::
179179
180- Extension provides alternative ways to specify bundle or even
180+ The extension provides alternative ways to specify the bundle, or even
181181 single feature inside it:
182182
183183 .. code-block :: bash
184184
185- $ php behat.phar " @YouBundleName /registration.feature"
185+ $ php behat.phar " @YourBundleName /registration.feature"
186186 $ php behat.phar src/YourCompany/YourBundleName/Features/registration.feature
187187
188- If you run specific bundle suite quite often , it might be useful to
188+ If you regularly run the specific bundle suite, it might be useful to
189189use Behat profile for that:
190190
191191.. code-block :: yaml
@@ -202,13 +202,13 @@ use Behat profile for that:
202202 Behat\Symfony2Extension\Extension :
203203 bundle : GroupBundle
204204
205- Now if you need to run ``UserBundle `` feature suite, you could just execute:
205+ Now if you need to run the ``UserBundle `` feature suite, you could just execute:
206206
207207.. code-block :: bash
208208
209209 $ php behat.phar -p=user
210210
211- Notice that in this case, you also can avoid bundlename specification for single
211+ Notice that in this case, you also can avoid bundlename specification for a single
212212feature run:
213213
214214.. code-block :: bash
@@ -247,7 +247,7 @@ Now just enable ``mink_driver`` in Symfony2Extension:
247247 mink_driver : true
248248 mink_extension.phar : ~
249249
250- Also, you can make ``symfony2 `` session the default one by setting ``default_session ``
250+ Also, you can make the ``symfony2 `` session the default one by setting ``default_session ``
251251option in MinkExtension:
252252
253253.. code-block :: yaml
@@ -260,7 +260,7 @@ option in MinkExtension:
260260 mink_extension.phar :
261261 default_session : ' symfony2'
262262
263- If you have installed via Composer, your ``behat.yml `` would instead look something like the below:
263+ If you installed via Composer, your ``behat.yml `` would instead look something like the below:
264264
265265.. code-block :: yaml
266266
@@ -275,9 +275,9 @@ If you have installed via Composer, your ``behat.yml`` would instead look someth
275275 Application Level Feature Suite
276276~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277277
278- You are not forced to use bundle-centric structure for your feature suites.
278+ You are not forced to use a bundle-centric structure for your feature suites.
279279If you want to keep your suite application level, you can simply do it by specifying
280- proper ``features `` path and ``context.class `` in your ``behat.yml ``:
280+ a proper ``features `` path and ``context.class `` in your ``behat.yml ``:
281281
282282.. code-block :: yaml
283283
@@ -289,8 +289,8 @@ proper ``features`` path and ``context.class`` in your ``behat.yml``:
289289
290290 .. note ::
291291
292- Keep in mind, that ``Symfony2Extension `` relies on ``Symfony2 `` autoloader for
293- context discover and disables Behat bundled autoloader (aka ``bootstrap `` folder).
292+ Keep in mind, that ``Symfony2Extension `` relies on the ``Symfony2 `` autoloader for
293+ context discovery and disables the Behat- bundled autoloader (aka ``bootstrap `` folder).
294294 So make sure that your context class is discoverable by ``Symfony2 `` autoloader
295295 (place it in proper folder/namespace).
296296
@@ -299,50 +299,49 @@ proper ``features`` path and ``context.class`` in your ``behat.yml``:
299299 If you're using both ``Symfony2Extension `` and ``MinkExtension `` and have defined
300300 wrong classname for your context class, you can run into problem where suite
301301 will still be runnable, but some of your custom definitions/hooks/methods will
302- not be available. This happens because ``Behat `` uses bundled with ``MinkExtension ``
302+ not be available. This happens because ``Behat `` uses the ``MinkExtension ``-bundled
303303 context class instead.
304304
305- So here 's what's happening:
305+ Here 's what's happening:
306306
307307 1. Behat tries to check existence of FeatureContext class (default) with
308308 `PredefinedClassGuesser <https://github.com/Behat/Behat/blob/master/src/Behat/Behat/Context/ClassGuesser/PredefinedClassGuesser.php >`_
309309 and obviously can't.
310- 2. Behat `tries another guessers <https://github.com/Behat/Behat/blob/master/src/Behat/Behat/Context/ContextDispatcher.php#L62-66 >`_
310+ 2. Behat `tries other guessers <https://github.com/Behat/Behat/blob/master/src/Behat/Behat/Context/ContextDispatcher.php#L62-66 >`_
311311 with lower priorities.
312312 3. `There is one
313313 <https://github.com/Behat/MinkExtension/blob/master/src/Behat/MinkExtension/Context/ClassGuesser/MinkContextClassGuesser.php#L20> `_
314314 defined by ``MinkExtension ``, which gets matched and tells Behat to use
315315 ``Behat\MinkExtension\Context\MinkContext `` as main context class.
316316
317- So, your ``FeatureContext `` isn't used really. ``Behat\MinkExtension\Context\MinkContext ``
317+ So, your ``FeatureContext `` isn't used, and ``Behat\MinkExtension\Context\MinkContext `` is
318318 used instead.
319319
320- So be sure to check that your suite is runned in proper context (by looking at
321- paths next to steps) and that you've defined proper, discoverable context classname .
320+ Be sure to check that your suite is run in a proper context (by looking at
321+ paths next to steps) and that you've defined proper, discoverable context classnames .
322322
323323Configuration
324324-------------
325325
326- Symfony2Extension comes with flexible configuration system, that gives you ability to
326+ Symfony2Extension comes with a flexible configuration system, that gives you the ability to
327327configure Symfony2 kernel inside Behat to fulfil all your needs.
328328
329- * ``bundle `` - specifies bundle to be runned for specific profile
330- * ``kernel `` - specifies options to instantiate kernel:
329+ * ``bundle `` - specifies a bundle to be run for specific profile
330+ * ``kernel `` - specifies options to instantiate the kernel:
331331
332- - ``bootstrap `` - defines autoloading/bootstraping file to autoload
333- all the needed classes in order to instantiate kernel.
334- - ``path `` - defines path to the kernel class to be requires in order
335- to instantiate it.
336- - ``class `` - defines name of the kernel class.
337- - ``env `` - defines environment in which kernel should be instantiated and used
332+ - ``bootstrap `` - defines an autoloading/bootstraping file to autoload
333+ all the required classes to instantiate the kernel.
334+ - ``path `` - defines the path to the kernel class in order to instantiate it.
335+ - ``class `` - defines the name of the kernel class.
336+ - ``env `` - defines the environment in which kernel should be instantiated and used
338337 inside suite.
339338 - ``debug `` - defines whether kernel should be instantiated with ``debug `` option
340339 set to true.
341340
342- * ``context `` - specifies options, used to guess context class:
341+ * ``context `` - specifies options, used to guess the context class:
343342
344343 - ``path_suffix `` - suffix from bundle directory for features.
345344 - ``class_suffix `` - suffix from bundle classname for context class.
346345
347- * ``mink_driver `` - if set to true - extension will load ``symfony2 `` session
346+ * ``mink_driver `` - if set to true - extension will load the ``symfony2 `` session
348347 for Mink.
0 commit comments