Jyxo\Beholder\TestCase\PgsqlTest::testConnectionFailure PHP Method

testConnectionFailure() public method

Tests connection failure.
    public function testConnectionFailure()
    {
        $database = 'dummy';
        $host = 'dummy.jyxo.com';
        $test = new Pgsql('Pgsql', 'SELECT 1', $database, $host);
        // @ on purpose
        $result = @$test->run();
        $this->assertEquals(\Jyxo\Beholder\Result::FAILURE, $result->getStatus());
        $this->assertEquals(sprintf('Connection error @%s:5432/%s', $host, $database), $result->getDescription());
    }