Автор: Tyler Colbert (tyler@colberts.us)
Пример #1
0
 public function setUp()
 {
     $this->markTestIncomplete('This is a very old test case that certainly does not work in its current form. But it may still be useful to be rescued.');
     @define('WICKED_BASE', __DIR__ . '/../..');
     @define('TEST_PAGE_1', 'driver-pages.phpt Test Page One');
     @define('TEST_PAGE_2', 'Renamed driver-pages.phpt Test Page (Called "Two")');
     $this->wicked = Wicked_Driver::factory('sql', $this->getTestDatabaseSQLDriverConfig());
 }
Пример #2
0
 /**
  */
 public function removeAllVersions($pagename)
 {
     /* Remove attachments and do other cleanup. */
     parent::removeAllVersions($pagename);
     $this->_pageNames = null;
     try {
         $this->_db->beginDbTransaction();
         $this->_db->delete('DELETE FROM ' . $this->_params['table'] . ' WHERE page_name = ?', array($this->_convertToDriver($pagename)));
         $this->_db->delete('DELETE FROM ' . $this->_params['historytable'] . ' WHERE page_name = ?', array($this->_convertToDriver($pagename)));
         $this->_db->commitDbTransaction();
     } catch (Horde_Db_Exception $e) {
         $this->_db->rollbackDbTransaction();
         throw new Wicked_Exception($e);
     }
 }