From 88ad1637ad3158a45878216dba8a8bc5cbc538f2 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Fri, 31 May 2013 23:28:43 +0200 Subject: [PATCH] Fix a couple @expectedException tests to, well, match the expected exception... --- modules/gallery/tests/Gallery_Graphics_Test.php | 5 +++-- modules/gallery/tests/Item_Test.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/gallery/tests/Gallery_Graphics_Test.php b/modules/gallery/tests/Gallery_Graphics_Test.php index 0e54eab324..2e5ff1c932 100644 --- a/modules/gallery/tests/Gallery_Graphics_Test.php +++ b/modules/gallery/tests/Gallery_Graphics_Test.php @@ -40,7 +40,7 @@ public function test_rotate_jpg_without_options() { } /** - * @expectedException Gallery_Exception + * @expectedException Kohana_Exception */ public function test_rotate_bad_jpg() { // Input is a garbled jpg, output is jpg autofit to 300x300 @@ -49,7 +49,8 @@ public function test_rotate_bad_jpg() { $options = array("degrees" => 90); file_put_contents($input_file, Test::lorem_ipsum(200)); - // Should get passed to Image library and throw an exception + // Should get passed to Image library and throw an exception. + // Since it's image and not gallery that throws the exception, it's a Kohana_Exception. GalleryGraphics::rotate($input_file, $output_file, $options, null); } diff --git a/modules/gallery/tests/Item_Test.php b/modules/gallery/tests/Item_Test.php index 9a7a21d749..958b01a143 100644 --- a/modules/gallery/tests/Item_Test.php +++ b/modules/gallery/tests/Item_Test.php @@ -67,7 +67,7 @@ public function test_move() { } /** - * @expectedException Gallery_Exception + * @expectedException ORM_Validation_Exception */ public function test_cant_move_parent_into_own_subtree() { $album1 = Test::random_album(Item::root());