summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Photo_Helper_Test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-27 16:15:00 -0700
committerBharat Mediratta <bharat@menalto.com>2009-05-27 16:17:29 -0700
commit88a3d43ba9b9377ba6bbe21a4547220ae3a37276 (patch)
treebcdfaa4188a7e9a8e698c895f84f0ca899005391 /modules/gallery/tests/Photo_Helper_Test.php
parent12fe58d997d2066dc362fd393a18b4e5da190513 (diff)
Update all references to the core application to now point to the
gallery module. This type of mass update is prone to some small bugs.
Diffstat (limited to 'modules/gallery/tests/Photo_Helper_Test.php')
-rw-r--r--modules/gallery/tests/Photo_Helper_Test.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/gallery/tests/Photo_Helper_Test.php b/modules/gallery/tests/Photo_Helper_Test.php
index deb11bb9..2a6693e1 100644
--- a/modules/gallery/tests/Photo_Helper_Test.php
+++ b/modules/gallery/tests/Photo_Helper_Test.php
@@ -21,7 +21,7 @@ class Photo_Helper_Test extends Unit_Test_Case {
public function create_photo_test() {
$rand = rand();
- $filename = DOCROOT . "core/tests/test.jpg";
+ $filename = MODPATH . "gallery/tests/test.jpg";
$image_info = getimagesize($filename);
$root = ORM::factory("item", 1);
@@ -50,8 +50,8 @@ class Photo_Helper_Test extends Unit_Test_Case {
public function create_conflicting_photo_test() {
$rand = rand();
$root = ORM::factory("item", 1);
- $photo1 = photo::create($root, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand);
- $photo2 = photo::create($root, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand);
+ $photo1 = photo::create($root, MODPATH . "gallery/tests/test.jpg", "$rand.jpg", $rand, $rand);
+ $photo2 = photo::create($root, MODPATH . "gallery/tests/test.jpg", "$rand.jpg", $rand, $rand);
$this->assert_true($photo1->name != $photo2->name);
}
@@ -68,7 +68,7 @@ class Photo_Helper_Test extends Unit_Test_Case {
public function thumb_url_test() {
$rand = rand();
$root = ORM::factory("item", 1);
- $photo = photo::create($root, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand);
+ $photo = photo::create($root, MODPATH . "gallery/tests/test.jpg", "$rand.jpg", $rand, $rand);
$this->assert_equal("http://./var/thumbs/{$rand}.jpg", $photo->thumb_url());
}
@@ -76,7 +76,7 @@ class Photo_Helper_Test extends Unit_Test_Case {
$rand = rand();
$root = ORM::factory("item", 1);
$album = album::create($root, $rand, $rand, $rand);
- $photo = photo::create($album, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand);
+ $photo = photo::create($album, MODPATH . "gallery/tests/test.jpg", "$rand.jpg", $rand, $rand);
$this->assert_equal("http://./var/resizes/{$rand}/{$rand}.jpg", $photo->resize_url());
}
@@ -85,7 +85,7 @@ class Photo_Helper_Test extends Unit_Test_Case {
$rand = rand();
$root = ORM::factory("item", 1);
try {
- $photo = photo::create($root, DOCROOT . "core/tests/test.jpg", "$rand/.jpg", $rand, $rand);
+ $photo = photo::create($root, MODPATH . "gallery/tests/test.jpg", "$rand/.jpg", $rand, $rand);
} catch (Exception $e) {
// pass
return;
@@ -98,7 +98,7 @@ class Photo_Helper_Test extends Unit_Test_Case {
$rand = rand();
$root = ORM::factory("item", 1);
try {
- $photo = photo::create($root, DOCROOT . "core/tests/test.jpg", "$rand.jpg.", $rand, $rand);
+ $photo = photo::create($root, MODPATH . "gallery/tests/test.jpg", "$rand.jpg.", $rand, $rand);
} catch (Exception $e) {
$this->assert_equal("@todo NAME_CANNOT_END_IN_PERIOD", $e->getMessage());
return;