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

testQueryFailure() public method

Tests query failure.
public testQueryFailure ( )
    public function testQueryFailure()
    {
        $pgsql = $this->getPgsql();
        $test = new Pgsql('Pgsql', 'SELECT * FROM test' . time(), $pgsql['database'], $pgsql['host'], $pgsql['user'], $pgsql['password'], $pgsql['port']);
        // @ on purpose
        $result = @$test->run();
        $this->assertEquals(\Jyxo\Beholder\Result::FAILURE, $result->getStatus());
        $this->assertEquals(sprintf('Query error %s@%s:%s/%s', $pgsql['user'], $pgsql['host'], $pgsql['port'], $pgsql['database']), $result->getDescription());
    }