Exemplo n.º 1
0
 /**
  * testAutoSelect
  *
  * @return  void
  */
 public function testAutoSelect()
 {
     $option = static::$dsn;
     $option['database'] = static::$dsn['dbname'];
     $option['password'] = static::$dsn['pass'];
     $db = new MysqlDriver(null, $option);
     $db->setQuery('SELECT * FROM #__flower')->loadAll();
 }
Exemplo n.º 2
0
 /**
  * testAutoSelect
  *
  * @return  void
  */
 public function testAutoSelect()
 {
     $option = static::$dsn;
     $option['database'] = static::$dsn['dbname'];
     $option['password'] = static::$dsn['pass'];
     $db = new MysqlDriver(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.');
 }
Exemplo n.º 3
0
 /**
  * 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();
 }