Skip to content

Commit

Permalink
Merge pull request #7 from surplex/feature/UIY-3913_enhance_routes
Browse files Browse the repository at this point in the history
UIY-3913 Change route for creating mocks, too
  • Loading branch information
TobiasHofmeister authored Jan 12, 2021
2 parents 5de1bec + 82e8fb3 commit 1770135
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Docker assigns automatically an open port. To see the assigned port use `$ docke

### Create a mock / Save a response

POST [url]?session_id=[session_id]
POST [url]/api-mock/create?session_id=[session_id]
{
"status_code": 200,
"headers": { ... },
Expand Down Expand Up @@ -64,7 +64,7 @@ Docker assigns automatically an open port. To see the assigned port use `$ docke
A GET request to the root URL of the API mock will return the count of unsent
mock responses for the given session.

GET [url]/api-mock/?session_id=[session_id]
GET [url]/api-mock/count?session_id=[session_id]

`$ curl [url]?session_id=[session_id]`
* **url:** *URL to API Mock*
Expand Down
2 changes: 1 addition & 1 deletion config/routes/mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
return [
[
'pattern' => '',
'pattern' => 'api-mock/create',
'route' => 'mock/mock/create',
'verb' => 'POST',
],
Expand Down
4 changes: 2 additions & 2 deletions tests/api/Mock/Controller/MockControllerCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MockControllerCest
*/
public function tryToSaveResponse(\ApiTester $I)
{
$I->sendPOST('/', [
$I->sendPOST('/api-mock/create', [
'data' => [
'test' => 'api'
],
Expand Down Expand Up @@ -68,7 +68,7 @@ public function tryToReceiveCountOfNotReceivedMocksAndShouldSeeZero(\ApiTester $
*/
public function tryToStoreClientRequest(\ApiTester $I)
{
$I->sendPOST('/', [
$I->sendPOST('/api-mock/create', [
'session_id' => 'apitest',
'status_code' => HttpCode::OK,
'headers' => ['Content-Type' => 'application/json'],
Expand Down

0 comments on commit 1770135

Please sign in to comment.