summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-02-18 23:30:29 +0100
committershadlaws <shad@shadlaws.com>2013-02-18 23:30:29 +0100
commit62035bdbe1f4e8173eff1d93a31bdb658686a926 (patch)
treecdddcedbb9f5776c2ee3978ab3def1d65289f952
parentafa61f9d0d551bc2a0c4fa903eb3f55742720c8d (diff)
Follow-on to fd0051dab7258c817ff01877bd4324530ce79398 for #2006.
- fix unit tests for watermarks, which check for deleted files.
-rw-r--r--modules/watermark/tests/Admin_Watermarks_Controller_Test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/watermark/tests/Admin_Watermarks_Controller_Test.php b/modules/watermark/tests/Admin_Watermarks_Controller_Test.php
index 0b4ba84b..6c6ecb15 100644
--- a/modules/watermark/tests/Admin_Watermarks_Controller_Test.php
+++ b/modules/watermark/tests/Admin_Watermarks_Controller_Test.php
@@ -68,6 +68,9 @@ class Admin_Watermarks_Controller_Test extends Gallery_Unit_Test_Case {
$controller->add();
$results = ob_get_clean();
+ // Delete all files marked using system::delete_later (from gallery_event::gallery_shutdown)
+ system::delete_marked_files();
+
// Add should *not* be successful, and watermark should be deleted
$this->assert_equal("", $results);
$this->assert_false(file_exists($watermark_path));
@@ -115,6 +118,9 @@ class Admin_Watermarks_Controller_Test extends Gallery_Unit_Test_Case {
$controller->add();
$results = ob_get_clean();
+ // Delete all files marked using system::delete_later (from gallery_event::gallery_shutdown)
+ system::delete_marked_files();
+
// Add should *not* be successful, and watermark should be deleted
$this->assert_equal("", $results);
$this->assert_false(file_exists($watermark_path));