Skip to content

Commit

Permalink
Merge pull request #33 from Leosten/feature/76038
Browse files Browse the repository at this point in the history
[Feature/76038] Ajout du context pour les tests mock sur proxy
  • Loading branch information
Leosten authored Jan 16, 2018
2 parents de231fa + 8f07987 commit 278e754
Show file tree
Hide file tree
Showing 4 changed files with 1,593 additions and 165 deletions.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,35 @@ composer-behat-coverage

Composer for php code coverage with behat

Dependencies
## Pour utiliser les tests mocks sur proxy
-----------------------

- Ajouter le context des mock dans le behat.yml avec ses paramètres :
```
suites:
default:
paths:
- %paths.base%/Tests/Functional/features
contexts:
- ETNA\FeatureContext\HttpApiMockContext:
host: '0.0.0.0'
port: '8080'
```

- Penser à rajouter l'URL du proxy dans l'env de testing sur
l'adresse et le port du serveur phiremock:
exemple:
```
putenv("CHANGEREQUEST_API_URL=http://localhost:8080");
```

- Lancer le serveur phiremock avant de lancer les tests:
```
./vendor/bin/phiremock -p 8080 -i 0.0.0.0 -d
```


## Dependencies
-----------------------
In your composer.json :
```
Expand All @@ -16,7 +44,7 @@ In your composer.json :
},
```

Install
## Install
-----------------------
* use this behat.yml if you dont have one :
```
Expand Down Expand Up @@ -83,7 +111,7 @@ wip:
tags: @wip
```

Run
##Run
-----------------------

```
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"php": ">=5.5",
"behat/behat": ">=3.2",
"guzzlehttp/guzzle": "~6.1",
"etna/php-rsa": "~0.2.0"
"etna/php-rsa": "~0.2.0",
"mcustiel/phiremock": "^1.7"
},
"require-dev": {
"phpunit/php-code-coverage": "~3.0",
Expand Down
Loading

0 comments on commit 278e754

Please sign in to comment.