diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-17 04:45:35 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-17 04:45:35 +0000 |
commit | fc7b78492bc671f6dd78e04f5d42de958cdfb1d7 (patch) | |
tree | 9ee1738b0869cd183f688180eedc144bb4fa385a /core/tests/Photo_Helper_Test.php | |
parent | f8a0c91ce689c5e0ae7bf05cc75b9982a3b26baf (diff) |
Separate thumbnails out into var/thumbs. This clears up some ambiguity in Item_Model and simplifies
file_proxy. It also means we can stop munging file names in the var/resizes hierarchy.
In the process, rename "thumbnail" to "thumb" everywhere in honor of
Chad (well, ok because it's shorter)..
Diffstat (limited to 'core/tests/Photo_Helper_Test.php')
-rw-r--r-- | core/tests/Photo_Helper_Test.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/tests/Photo_Helper_Test.php b/core/tests/Photo_Helper_Test.php index 4c804a6f..f31509a3 100644 --- a/core/tests/Photo_Helper_Test.php +++ b/core/tests/Photo_Helper_Test.php @@ -27,12 +27,12 @@ class Photo_Helper_Test extends Unit_Test_Case { $photo = photo::create(1, $filename, "$rand.jpg", $rand, $rand); $this->assert_equal(VARPATH . "albums/$rand.jpg", $photo->file_path()); - $this->assert_equal(VARPATH . "resizes/{$rand}.thumb.jpg", $photo->thumbnail_path()); - $this->assert_equal(VARPATH . "resizes/{$rand}.resize.jpg", $photo->resize_path()); + $this->assert_equal(VARPATH . "thumbs/{$rand}.jpg", $photo->thumb_path()); + $this->assert_equal(VARPATH . "resizes/{$rand}.jpg", $photo->resize_path()); $this->assert_true(is_file($photo->file_path()), "missing: {$photo->file_path()}"); $this->assert_true(is_file($photo->resize_path()), "missing: {$photo->resize_path()}"); - $this->assert_true(is_file($photo->thumbnail_path()), "missing: {$photo->thumbnail_path()}"); + $this->assert_true(is_file($photo->thumb_path()), "missing: {$photo->thumb_path()}"); $this->assert_equal(1, $photo->parent_id); // MPTT tests will cover other hierarchy checks $this->assert_equal("$rand.jpg", $photo->name); @@ -62,10 +62,10 @@ class Photo_Helper_Test extends Unit_Test_Case { } } - public function thumbnail_url_test() { + public function thumb_url_test() { $rand = rand(); $photo = photo::create(1, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand); - $this->assert_equal("http://./var/resizes/{$rand}.thumb.jpg", $photo->thumbnail_url()); + $this->assert_equal("http://./var/thumbs/{$rand}.jpg", $photo->thumb_url()); } public function resize_url_test() { @@ -73,6 +73,6 @@ class Photo_Helper_Test extends Unit_Test_Case { $album = album::create(1, $rand, $rand, $rand); $photo = photo::create($album->id, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand); - $this->assert_equal("http://./var/resizes/{$rand}/{$rand}.resize.jpg", $photo->resize_url()); + $this->assert_equal("http://./var/resizes/{$rand}/{$rand}.jpg", $photo->resize_url()); } } |