/** * testAutoSelect * * @return void */ public function testAutoSelect() { $option = static::$dsn; $option['database'] = static::$dsn['dbname']; $option['password'] = static::$dsn['pass']; $db = new PostgresqlDriver(null, $option); $e = null; try { $db->setQuery('SELECT * FROM #__flower')->loadAll(); } catch (\Exception $e) { // No action } $this->assertNull($e, '$e should not be an exception.'); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @return void */ protected function setUp() { parent::setUp(); $this->db = static::$dbo; $this->connection = $this->db->getConnection(); }