rcrowe\Hippy\Tests\Transport\GuzzleBasicTest::testDefaultInstance PHP Method

testDefaultInstance() public method

public testDefaultInstance ( )
    public function testDefaultInstance()
    {
        $guzzle = new Guzzle('123', 'egg', 'vivalacrowe');
        $this->assertTrue(is_a($guzzle, 'rcrowe\\Hippy\\Transport\\TransportInterface'));
        $this->assertEquals($guzzle->getToken(), '123');
        $this->assertEquals($guzzle->getRoom(), 'egg');
        $this->assertEquals($guzzle->getFrom(), 'vivalacrowe');
        $this->assertEquals($guzzle->getEndpoint(), 'https://api.hipchat.com/v1/');
        $this->assertTrue(is_a($guzzle->getHttp(), 'Guzzle\\Http\\Client'));
        $this->assertEquals($guzzle->getHttp()->getBaseUrl(), 'https://api.hipchat.com/v1/');
        $headers = $guzzle->getHeaders();
        $this->assertEquals(count($headers), 1);
        $this->assertEquals($headers['Content-type'], 'application/x-www-form-urlencoded');
    }