InterNations\Component\HttpMock\Tests\PHPUnit\HttpMockMultiPHPUnitIntegrationTest::testCallbackOnResponse PHP Method

testCallbackOnResponse() public method

    public function testCallbackOnResponse()
    {
        $this->http['firstNamedServer']->mock->when()->methodIs('POST')->then()->callback(static function (Response $response) {
            $response->setContent('CALLBACK');
        })->end();
        $this->http['firstNamedServer']->setUp();
        $this->assertSame('CALLBACK', $this->http['firstNamedServer']->client->post('/')->send()->getBody(true));
    }