Example #1
0
 /**
  * test peardb wrapper with SQLite
  */
 function testDbPeardbSqlite()
 {
     // skip testing sqlite if not allowed
     if (!$this->allowTestSqlite()) {
         return;
     }
     // skip test if no PEAR DB installed
     if (!epFileExistsIncPath('DB.php')) {
         return;
     }
     include_once EP_SRC_DB . '/epDbPeardb.php';
     $this->assertTrue($dsn = $this->_getDsn('sqlite_peardb'));
     $this->assertTrue($db = new epDbPeardb($dsn));
     $this->_testSqlite($db);
 }
Example #2
0
 /**
  * Checks if we can test Peardb. Pear DB installation is checked.
  * @return boolean
  */
 function canTestPeardb()
 {
     // return false if Peardb tests are not allowed
     if (!$this->allowTestPeardb()) {
         return false;
     }
     // skip test if no PEAR DB installed
     if (!epFileExistsIncPath('DB.php')) {
         return false;
     }
     return true;
 }