File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff 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\E xtension\W ireMock
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\E xtension\W iremockConnection::get();
156+ // Now you can use wiremock-php library
157157 }
158158}
159159` ` `
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments