Skip to content

Commit 9145db9

Browse files
authored
Update README.md
1 parent 60f77ad commit 9145db9

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,51 @@ Behat HTTP Mock Context
88
Installation
99
============
1010

11-
Step 1: Install Context
11+
Step 1: Download the Bundle
1212
----------------------------------
1313
Open a command console, enter your project directory and execute:
1414

15+
### Applications that use Symfony Flex [in progress]
1516
```console
1617
$ composer require --dev macpaw/behat-http-mock-context
1718
```
1819

19-
Step 2: Update Container config to load Context
20-
----------------------------------
21-
In the `config/services_test.yaml` file of your project:
20+
### Applications that don't use Symfony Flex
2221

23-
```yaml
24-
BehatHttpMockContext\:
25-
resource: '../vendor/macpaw/behat-http-mock-context/src/*'
22+
Open a command console, enter your project directory and execute the
23+
following command to download the latest stable version of this bundle:
24+
25+
```console
26+
$ composer require --dev macpaw/behat-http-mock-context
27+
```
28+
29+
This command requires you to have Composer installed globally, as explained
30+
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
31+
of the Composer documentation.
32+
33+
34+
Then, enable the bundle by adding it to the list of registered bundles
35+
in the `app/AppKernel.php` file of your project:
36+
37+
```php
38+
<?php
39+
// app/AppKernel.php
40+
41+
// ...
42+
class AppKernel extends Kernel
43+
{
44+
public function registerBundles()
45+
{
46+
$bundles = array(
47+
// ...
48+
BehatHttpMockContext\BehatHttpMockContextBundle::class => ['test' => true],
49+
);
50+
51+
// ...
52+
}
53+
54+
// ...
55+
}
2656
```
2757

2858
Step 2: Mock http client
@@ -55,7 +85,7 @@ Now we ready add build mock collection
5585
...
5686
```
5787

58-
Step 4: Configure Behat
88+
Step 3: Configure Behat
5989
=============
6090
Go to `behat.yml`
6191

0 commit comments

Comments
 (0)