Curl\CurlTest::testHeaders PHP Метод

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

public testHeaders ( )
    public function testHeaders()
    {
        $this->curl->setHeader('Content-Type', 'application/json');
        $this->curl->setHeader('X-Requested-With', 'XMLHttpRequest');
        $this->curl->setHeader('Accept', 'application/json');
        $this->assertTrue($this->server('GET', array('test' => 'server', 'key' => 'CONTENT_TYPE')) === 'application/json');
        $this->assertTrue($this->server('GET', array('test' => 'server', 'key' => 'HTTP_X_REQUESTED_WITH')) === 'XMLHttpRequest');
        $this->assertTrue($this->server('GET', array('test' => 'server', 'key' => 'HTTP_ACCEPT')) === 'application/json');
    }