Пример #1
0
    public function testExtractorsOnInvalidString()
    {
        // Try with an empty string
        $response_str = '';

        $this->assertTrue(Response::extractCode($response_str) === false);
        $this->assertTrue(Response::extractMessage($response_str) === false);
        $this->assertTrue(Response::extractVersion($response_str) === false);
        $this->assertTrue(Response::extractBody($response_str) === '');
        $this->assertTrue(Response::extractHeaders($response_str) === array());
    }