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

« back to all changes in this revision

Viewing changes to modules/core/test/phpunit/ItemMakeHighlightControllerTest.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: ItemMakeHighlightControllerTest.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.23 $ $Date: 2005/08/23 03:49:33 $
 
23
 * @version $Revision: 1.24 $ $Date: 2006/01/10 04:39:36 $
24
24
 * @package GalleryCore
25
25
 * @subpackage PHPUnit
26
26
 * @author Bharat Mediratta <bharat@menalto.com>
46
46
            'ItemMakeHighlightTestToolkit', 'ItemMakeHighlightTestToolkit',
47
47
            'modules/core/test/phpunit/ItemMakeHighlightControllerTest.class',
48
48
            'coreTest', null);
49
 
        if ($ret->isError()) {
 
49
        if ($ret) {
50
50
            print $ret->getAsHtml();
51
51
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
52
52
        }
58
58
            array(array('type' => 'int', 'description' => 'foo'),
59
59
                  array('type' => 'int', 'description' => 'foo')),
60
60
            'test-description');
61
 
        if ($ret->isError()) {
 
61
        if ($ret) {
62
62
            print $ret->getAsHtml();
63
63
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
64
64
        }
65
65
 
66
66
        list ($ret, $this->_album) = $this->_createRandomAlbum($this->_getRootId());
67
 
        if ($ret->isError()) {
 
67
        if ($ret) {
68
68
            print $ret->getAsHtml();
69
69
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
70
70
        }
71
71
        $this->_markForCleanup($this->_album);
72
72
 
73
73
        list ($ret, $this->_subalbum) = $this->_createRandomAlbum($this->_album->getId());
74
 
        if ($ret->isError()) {
 
74
        if ($ret) {
75
75
            print $ret->getAsHtml();
76
76
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
77
77
        }
78
78
 
79
79
        list ($ret, $this->_item) =
80
80
            $this->_createRandomDataItem($this->_subalbum->getId(), 'test/file');
81
 
        if ($ret->isError()) {
 
81
        if ($ret) {
82
82
            print $ret->getAsHtml();
83
83
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
84
84
        }
86
86
        list ($ret, $this->_derivative) =
87
87
            $this->_createDerivative($this->_item, $this->_item->getId(),
88
88
                                     DERIVATIVE_TYPE_IMAGE_THUMBNAIL, 'thumbnail|200');
89
 
        if ($ret->isError()) {
 
89
        if ($ret) {
90
90
            print $ret->getAsHtml();
91
91
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
92
92
        }
112
112
        /* Verify highlight was set */
113
113
        list ($ret, $thumbnail) =
114
114
            GalleryCoreApi::fetchThumbnailsByItemIds(array($this->_subalbum->getId()));
115
 
        if ($ret->isError()) {
 
115
        if ($ret) {
116
116
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
117
117
        }
118
118
        if (!empty($thumbnail)) {
134
134
        /* Verify highlight was set */
135
135
        list ($ret, $thumbnail) =
136
136
            GalleryCoreApi::fetchThumbnailsByItemIds(array($this->_album->getId()));
137
 
        if ($ret->isError()) {
 
137
        if ($ret) {
138
138
            return $this->failWithStatus($ret->wrap(__FILE__, __LINE__));
139
139
        }
140
140
        if (!empty($thumbnail)) {