Skip to content

Commit 3825ee6

Browse files
committed
Improved config
1 parent 16187fc commit 3825ee6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ After the tests are finished it will close the connection and turn wiremock serv
77

88
## See also
99

10-
* WireMock PHP library: https://github.com/rowanhill/wiremock-php
11-
* Stubbing using WireMock: http://wiremock.org/stubbing.html
12-
* Verifying using WireMock: http://wiremock.org/verifying.html
10+
* [WireMock PHP library](https://github.com/rowanhill/wiremock-php)
11+
* [Stubbing using WireMock](http://wiremock.org/stubbing.html)
12+
* [Verifying using WireMock](http://wiremock.org/verifying.html)
1313

1414
## Installation
1515

@@ -66,7 +66,6 @@ extensions:
6666
- Codeception\Extension\WireMock
6767
```
6868

69-
7069
#### Connect to a running WireMock instance
7170

7271
```yaml
@@ -153,7 +152,8 @@ class YourCest extends \Codeception\TestCase\Test
153152
// Also, you can access wiremock-php library directly
154153
public function moreComplexTest()
155154
{
156-
155+
$wiremockPhp = Codeception\Extension\WiremockConnection::get();
156+
// Now you can use wiremock-php library
157157
}
158158
}
159159
```

tests/tests/acceptance/WelcomeCest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public function _before(\AcceptanceTester $I)
1919

2020
public function _after(\AcceptanceTester $I)
2121
{
22-
$I->cleanAllPreviousRequests();
22+
$I->cleanAllPreviousRequestsToWireMock();
2323
}
2424

2525
// tests
2626
public function tryToTest(\AcceptanceTester $I)
2727
{
28-
$I->expectRequest(
28+
$I->expectRequestToWireMock(
2929
WireMock::get(WireMock::urlEqualTo('/some/url'))
3030
->willReturn(WireMock::aResponse()
3131
->withHeader('Content-Type', 'text/plain')
@@ -34,7 +34,7 @@ public function tryToTest(\AcceptanceTester $I)
3434

3535
$response = file_get_contents('http://localhost:18080/some/url');
3636

37-
$I->receivedRequest(
37+
$I->receivedRequestToWireMock(
3838
WireMock::getRequestedFor(WireMock::urlEqualTo('/some/url'))
3939
);
4040
}

0 commit comments

Comments
 (0)