~ubuntu-branches/ubuntu/hardy/gallery2/hardy-security

« back to all changes in this revision

Viewing changes to modules/core/test/phpunit/FlushDatabaseCacheTaskTest.class

  • Committer: Bazaar Package Importer
  • Author(s): Michael C. Schultheiss
  • Date: 2006-04-16 16:42:35 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060416164235-8uy0u4bfjdxpge2o
Tags: 2.1.1-1
* New upstream release (Closes: #362936)
  + Bugfixes for Postgres7 (Closes: #359000, #362152)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * $RCSfile: FlushDatabaseCacheTaskTest.class,v $
4
4
 *
5
5
 * Gallery - a web based photo album viewer and editor
6
 
 * Copyright (C) 2000-2005 Bharat Mediratta
 
6
 * Copyright (C) 2000-2006 Bharat Mediratta
7
7
 *
8
8
 * This program is free software; you can redistribute it and/or modify
9
9
 * it under the terms of the GNU General Public License as published by
20
20
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
21
21
 */
22
22
/**
23
 
 * @version $Revision: 1.4 $ $Date: 2005/08/23 03:49:33 $
 
23
 * @version $Revision: 1.5 $ $Date: 2006/01/10 04:39:36 $
24
24
 * @package GalleryCore
25
25
 * @subpackage PHPUnit
26
26
 * @author Bharat Mediratta <bharat@menalto.com>
27
27
 */
28
28
 
29
 
GalleryCoreApi::relativeRequireOnce('modules/core/classes/FlushDatabaseCacheTask.class');
 
29
GalleryCoreApi::requireOnce('modules/core/classes/FlushDatabaseCacheTask.class');
30
30
 
31
31
/**
32
32
 * Test the FlushDatabaseCache maintenance task functionality
49
49
        $task = new FlushDatabaseCacheTask();
50
50
 
51
51
        list ($ret, $success, $details) = $task->run();
52
 
        if ($ret->isError()) {
 
52
        if ($ret) {
53
53
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
54
54
        }
55
55
 
56
56
        list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'core');
57
 
        if ($ret->isError()) {
 
57
        if ($ret) {
58
58
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
59
59
        }
60
60
 
87
87
        $task = new FlushDatabaseCacheTask();
88
88
 
89
89
        list ($ret, $success, $details) = $task->run();
90
 
        if ($ret->isError()) {
 
90
        if ($ret) {
91
91
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
92
92
        }
93
93
 
94
94
        list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'core');
95
 
        if ($ret->isError()) {
 
95
        if ($ret) {
96
96
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
97
97
        }
98
98
 
144
144
    function recursiveRmdir($dir) {
145
145
        return $this->_addCall("recursiveRmdir($dir)");
146
146
    }
 
147
 
 
148
    function realpath($path) {
 
149
        return $path;
 
150
    }
147
151
}
148
152
?>