InterNations\Component\HttpMock\Tests\RequestCollectionFacadeTest::testRequestLatestResponseWithHttpAuth PHP Метод

testRequestLatestResponseWithHttpAuth() публичный Метод

public testRequestLatestResponseWithHttpAuth ( $method, $path, array $args = [], $httpMethod = 'get' )
$args array
    public function testRequestLatestResponseWithHttpAuth($method, $path, array $args = [], $httpMethod = 'get')
    {
        $this->mockClient($path, $this->createComplexResponse(), $httpMethod);
        $request = call_user_func_array([$this->facade, $method], $args);
        $this->assertSame('POST', $request->getMethod());
        $this->assertSame('/foo', $request->getPath());
        $this->assertSame('RECORDED=1', (string) $request->getBody());
        $this->assertSame('host', $request->getHost());
        $this->assertSame(1234, $request->getPort());
        $this->assertSame('username', $request->getUsername());
        $this->assertSame('password', $request->getPassword());
        $this->assertSame('CUSTOM UA', $request->getUserAgent());
    }