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

testCountRequests() public method

public testCountRequests ( )
    public function testCountRequests()
    {
        $this->http->mock->when()->pathIs('/resource')->then()->body('resource body')->end();
        $this->http->setUp();
        $this->assertCount(0, $this->http->requests);
        $this->assertSame('resource body', (string) $this->http->client->get('/resource')->send()->getBody());
        $this->assertCount(1, $this->http->requests);
    }