@@ -11,11 +11,14 @@ the request you have sent to mock server and manage the expectations of mockserv
1111//You can create expectations before call your application in a test
1212$I->createMockRequest('{"id": "elastic-get-entity-1", "httpRequest": {...}, "httpResponse": {...}}')
1313$I->createMockRequest('{"id": "elastic-get-entity-2", "httpRequest": {...}, "httpResponse": {...}}')
14+ $I->createMockRequestFromJsonFile('/root/path/elastic-get-entity-3.json')
1415$I->sendGet('/applition/endpoint/1');
1516//After execute our application we can check our mocked HTTP communication
1617$I->seeMockRequestWasCalled('elastic-get-entity-1');
1718$I->seeMockRequestWasNotCalled('elastic-get-entity-2');
1819$I->seeAllRequestWereMatched();
20+ $I->removeMockRequest("elastic-get-entity-2");
21+ $I->removeAllMockRequest();
1922```
2023
2124## Installation
@@ -41,6 +44,8 @@ modules:
4144 cleanupBefore : ' test'
4245 # # Optional field, [enabled, disabled] allowed. Default: enabled
4346 notMatchedRequest : ' enabled'
47+ # # Optional field, path of the expectations folder or file to load before test
48+ expectationsPath : ' /absolute/expectations/path'
4449` ` `
4550
4651### cleanupBefore
@@ -62,6 +67,10 @@ our expectations, returning a 500 error with a message `Request not matched by M
6267It allows us to validate all request our application do, are expected and we haven't change our communication with
6368external services.
6469
70+ # ## expectationsPath
71+
72+ Get the file or files in the path, and send the content to create expectations on mockserver.
73+
6574# # About
6675
6776# ## Requirements
0 commit comments