InterNations\Component\HttpMock\Tests\PHPUnit\HttpMockPHPUnitIntegrationTest::testErrorLogOutput PHP Method

testErrorLogOutput() public method

public testErrorLogOutput ( )
    public function testErrorLogOutput()
    {
        $this->http->mock->when()->callback(static function () {
            error_log('error output');
        })->then()->end();
        $this->http->setUp();
        $this->http->client->get('/foo')->send();
        // Should fail during tear down as we have an error_log() on the server side
        try {
            $this->tearDown();
            $this->fail('Exception expected');
        } catch (\PHPUnit_Framework_ExpectationFailedException $e) {
            $this->assertContains('HTTP mock server standard error output should be empty', $e->getMessage());
        }
    }