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

« back to all changes in this revision

Viewing changes to modules/mime/test/phpunit/MimeAdminControllerTest.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: MimeAdminControllerTest.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
21
21
 */
22
22
 
23
23
/**
24
 
 * @version $Revision: 1.6 $ $Date: 2005/08/26 19:14:22 $
 
24
 * @version $Revision: 1.7 $ $Date: 2006/01/10 04:40:52 $
25
25
 * @package Mime
26
26
 * @subpackage PHPUnit
27
27
 * @author Felix Rabinovich <felix@rabinovich.org>
36
36
        parent::setUp();
37
37
 
38
38
        $ret = GalleryCoreApi::addMimeType('xxx', 'test/test', false);
39
 
        if ($ret->isError()) {
 
39
        if ($ret) {
40
40
            print $ret->getAsHtml();
41
41
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
42
42
        }
44
44
 
45
45
    function tearDown() {
46
46
        $ret = GalleryCoreApi::removeMimeType(array('mimeType' => 'test/test'));
47
 
        if ($ret->isError()) {
 
47
        if ($ret) {
48
48
            $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
49
49
        }
50
50
 
60
60
                                  'error' => array()),
61
61
                            $results, 'Delete');
62
62
        list ($ret, $extensions) = GalleryCoreApi::convertMimeToExtensions('test/test');
63
 
        if ($ret->isError()) {
 
63
        if ($ret) {
64
64
            return array($ret->wrap(__FILE__, __LINE__), null);
65
65
        }
66
66
        $this->assertEquals(array(), $extensions, 'Delete results');