Doctrine\Tests\CouchDB\HTTP\SocketClientTestCase::testNoConnectionPossible PHP Метод

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

    public function testNoConnectionPossible()
    {
        $db = new HTTP\SocketClient('127.0.0.1', 12345);
        try {
            $db->request('GET', '/' . $this->getTestDatabase());
            $this->fail('Expected HTTPException.');
        } catch (HTTP\HTTPException $e) {
            $this->assertTrue($e->getMessage() === 'Could not connect to server at 127.0.0.1:12345: \'111: Connection refused\'' || $e->getMessage() === 'Could not connect to server at 127.0.0.1:12345: \'61: Connection refused\'');
        }
    }