From eb8c15b9a0f76e63336808bb34f8bbc5919af611 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 9 Mar 2012 22:08:55 +0000 Subject: [PATCH] whitespace --- contrib/admin/test.php | 8 ++++---- contrib/bulk_add/test.php | 4 ++-- contrib/featured/test.php | 6 +++--- contrib/home/test.php | 10 +++++----- contrib/ipban/test.php | 8 ++++---- contrib/random_image/test.php | 10 +++++----- contrib/regen_thumb/test.php | 2 +- contrib/rss_comments/test.php | 2 +- contrib/rss_images/test.php | 10 +++++----- ext/alias_editor/test.php | 12 ++++++------ ext/index/test.php | 20 ++++++++++---------- ext/setup/test.php | 8 ++++---- ext/view/test.php | 18 +++++++++--------- 13 files changed, 59 insertions(+), 59 deletions(-) diff --git a/contrib/admin/test.php b/contrib/admin/test.php index a645c2b8..13718ae3 100644 --- a/contrib/admin/test.php +++ b/contrib/admin/test.php @@ -18,17 +18,17 @@ class AdminPageTest extends ShimmieWebTestCase { $this->log_in_as_admin(); $image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "TeStCase$ts"); - $this->get_page("post/view/$image_id_1"); - $this->assert_title("Image $image_id_1: TeStCase$ts"); + $this->get_page("post/view/$image_id_1"); + $this->assert_title("Image $image_id_1: TeStCase$ts"); $this->get_page('admin'); $this->assert_title("Admin Tools"); $this->set_field("action", "lowercase all tags"); $this->click("Go"); - $this->get_page("post/view/$image_id_1"); + $this->get_page("post/view/$image_id_1"); // FIXME: doesn't work? - //$this->assert_title("Image $image_id_1: testcase$ts"); + //$this->assert_title("Image $image_id_1: testcase$ts"); $this->delete_image($image_id_1); $this->log_out(); diff --git a/contrib/bulk_add/test.php b/contrib/bulk_add/test.php index fb676c04..40b4d4e5 100644 --- a/contrib/bulk_add/test.php +++ b/contrib/bulk_add/test.php @@ -3,13 +3,13 @@ class BulkAddTest extends ShimmieWebTestCase { function testBulkAdd() { $this->log_in_as_admin(); - $this->get_page('admin'); + $this->get_page('admin'); $this->assert_title("Admin Tools"); $this->set_field('dir', "asdf"); $this->click("Add"); $this->assert_text("is not a directory"); - $this->get_page('admin'); + $this->get_page('admin'); $this->assert_title("Admin Tools"); $this->set_field('dir', "contrib/simpletest"); $this->click("Add"); diff --git a/contrib/featured/test.php b/contrib/featured/test.php index ef095ad7..24c17651 100644 --- a/contrib/featured/test.php +++ b/contrib/featured/test.php @@ -8,16 +8,16 @@ class FeaturedTest extends ShimmieWebTestCase { # FIXME: test that regular users can't feature things $this->log_in_as_admin(); - $this->get_page("post/view/$image_id"); + $this->get_page("post/view/$image_id"); $this->assert_title("Image $image_id: pbx"); $this->click("Feature This"); - $this->get_page("post/list"); + $this->get_page("post/list"); $this->assert_text("Featured Image"); $this->delete_image($image_id); $this->log_out(); # after deletion, there should be no feature - $this->get_page("post/list"); + $this->get_page("post/list"); $this->assert_no_text("Featured Image"); # FIXME: test changing from one feature to another diff --git a/contrib/home/test.php b/contrib/home/test.php index 01b3dff5..ada45afe 100644 --- a/contrib/home/test.php +++ b/contrib/home/test.php @@ -1,11 +1,11 @@ get_page('home'); - $this->assert_title('Shimmie'); - $this->assert_text('Shimmie'); + function testHomePage() { + $this->get_page('home'); + $this->assert_title('Shimmie'); + $this->assert_text('Shimmie'); # FIXME: test search box - } + } } ?> diff --git a/contrib/ipban/test.php b/contrib/ipban/test.php index e331721b..9fd636d4 100644 --- a/contrib/ipban/test.php +++ b/contrib/ipban/test.php @@ -1,13 +1,13 @@ get_page('ip_ban/list'); + $this->get_page('ip_ban/list'); $this->assert_response(403); $this->assert_title("Permission Denied"); - $this->log_in_as_admin(); + $this->log_in_as_admin(); - $this->get_page('ip_ban/list'); + $this->get_page('ip_ban/list'); $this->assert_no_text("42.42.42.42"); $this->set_field('ip', '42.42.42.42'); $this->set_field('reason', 'unit testing'); @@ -18,7 +18,7 @@ class IPBanTest extends SCoreWebTestCase { $this->click("Remove"); // FIXME: remove which ban? :S $this->assert_no_text("42.42.42.42"); - $this->get_page('ip_ban/list?all=on'); // just test it doesn't crash for now + $this->get_page('ip_ban/list?all=on'); // just test it doesn't crash for now $this->log_out(); diff --git a/contrib/random_image/test.php b/contrib/random_image/test.php index 71205073..9a462bf2 100644 --- a/contrib/random_image/test.php +++ b/contrib/random_image/test.php @@ -5,13 +5,13 @@ class RandomTest extends ShimmieWebTestCase { $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test"); $this->log_out(); - $this->get_page("random_image/view"); - $this->assert_title("Image $image_id: test"); + $this->get_page("random_image/view"); + $this->assert_title("Image $image_id: test"); - $this->get_page("random_image/view/test"); - $this->assert_title("Image $image_id: test"); + $this->get_page("random_image/view/test"); + $this->assert_title("Image $image_id: test"); - $raw = $this->get_page("random_image/download"); + $raw = $this->get_page("random_image/download"); # FIXME: assert($raw == file(blah.jpg)) $this->log_in_as_admin(); diff --git a/contrib/regen_thumb/test.php b/contrib/regen_thumb/test.php index d1778e89..cb2139f6 100644 --- a/contrib/regen_thumb/test.php +++ b/contrib/regen_thumb/test.php @@ -3,7 +3,7 @@ class RegenThumbTest extends ShimmieWebTestCase { function testRegenThumb() { $this->log_in_as_admin(); $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot"); - $this->get_page("post/view/$image_id"); + $this->get_page("post/view/$image_id"); $this->click("Regenerate"); $this->assert_title("Thumbnail Regenerated"); $this->delete_image($image_id); diff --git a/contrib/rss_comments/test.php b/contrib/rss_comments/test.php index 554f9d09..e6062c29 100644 --- a/contrib/rss_comments/test.php +++ b/contrib/rss_comments/test.php @@ -9,7 +9,7 @@ class RSSCommentsTest extends ShimmieWebTestCase { $this->assert_text("ASDFASDF"); $this->log_out(); - $this->get_page('rss/comments'); + $this->get_page('rss/comments'); $this->assert_mime("application/rss+xml"); $this->assert_no_text("Exception"); $this->assert_text("ASDFASDF"); diff --git a/contrib/rss_images/test.php b/contrib/rss_images/test.php index 63d8371a..9447ecc6 100644 --- a/contrib/rss_images/test.php +++ b/contrib/rss_images/test.php @@ -5,26 +5,26 @@ class RSSImagesTest extends ShimmieWebTestCase { $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot"); $this->log_out(); - $this->get_page('rss/images'); + $this->get_page('rss/images'); $this->assert_mime("application/rss+xml"); $this->assert_no_text("Exception"); - $this->get_page('rss/images/1'); + $this->get_page('rss/images/1'); $this->assert_mime("application/rss+xml"); $this->assert_no_text("Exception"); # FIXME: test that the image is actually found - $this->get_page('rss/images/computer/1'); + $this->get_page('rss/images/computer/1'); $this->assert_mime("application/rss+xml"); $this->assert_no_text("Exception"); # valid tag, invalid page - $this->get_page('rss/images/computer/2'); + $this->get_page('rss/images/computer/2'); $this->assert_mime("application/rss+xml"); $this->assert_no_text("Exception"); # not found - $this->get_page('rss/images/waffle/2'); + $this->get_page('rss/images/waffle/2'); $this->assert_mime("application/rss+xml"); $this->assert_no_text("Exception"); diff --git a/ext/alias_editor/test.php b/ext/alias_editor/test.php index 5c36dad7..400c8c35 100644 --- a/ext/alias_editor/test.php +++ b/ext/alias_editor/test.php @@ -1,13 +1,13 @@ get_page('alias/list'); + $this->get_page('alias/list'); $this->assert_title("Alias List"); $this->log_in_as_admin(); # test one to one - $this->get_page('alias/list'); + $this->get_page('alias/list'); $this->assert_title("Alias List"); $this->set_field('oldtag', "test1"); $this->set_field('newtag', "test2"); @@ -26,13 +26,13 @@ class AliasEditorTest extends ShimmieWebTestCase { $this->assert_title("Image $image_id: test2"); $this->delete_image($image_id); - $this->get_page('alias/list'); + $this->get_page('alias/list'); $this->click("Remove"); $this->assert_title("Alias List"); $this->assert_no_text("test1"); # test one to many - $this->get_page('alias/list'); + $this->get_page('alias/list'); $this->assert_title("Alias List"); $this->set_field('oldtag', "onetag"); $this->set_field('newtag', "multi tag"); @@ -58,7 +58,7 @@ class AliasEditorTest extends ShimmieWebTestCase { $this->delete_image($image_id_1); $this->delete_image($image_id_2); - $this->get_page('alias/list'); + $this->get_page('alias/list'); $this->click("Remove"); $this->assert_title("Alias List"); $this->assert_no_text("test1"); @@ -66,7 +66,7 @@ class AliasEditorTest extends ShimmieWebTestCase { $this->log_out(); - $this->get_page('alias/list'); + $this->get_page('alias/list'); $this->assert_title("Alias List"); $this->assert_no_text("Add"); } diff --git a/ext/index/test.php b/ext/index/test.php index d75f3126..c4f63ec3 100644 --- a/ext/index/test.php +++ b/ext/index/test.php @@ -9,20 +9,20 @@ class IndexTest extends ShimmieWebTestCase { $image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot"); $this->log_out(); - $this->get_page('post/list'); + $this->get_page('post/list'); $this->assert_title("Shimmie"); $this->assert_text("Prev | Index | Next"); - $this->get_page('post/list/-1'); + $this->get_page('post/list/-1'); $this->assert_title("Shimmie"); - $this->get_page('post/list/0'); + $this->get_page('post/list/0'); $this->assert_title("Shimmie"); - $this->get_page('post/list/1'); + $this->get_page('post/list/1'); $this->assert_title("Shimmie"); - $this->get_page('post/list/99999'); + $this->get_page('post/list/99999'); $this->assert_title("Shimmie"); $this->log_in_as_admin(); @@ -43,17 +43,17 @@ class IndexTest extends ShimmieWebTestCase { $this->assertTrue($image_id_2 > 0); # regular tag, no results - $this->get_page('post/list/maumaumau/1'); + $this->get_page('post/list/maumaumau/1'); $this->assert_title("maumaumau"); $this->assert_text("No Images Found"); # regular tag, many results - $this->get_page('post/list/computer/1'); + $this->get_page('post/list/computer/1'); $this->assert_title("computer"); $this->assert_no_text("No Images Found"); # meta tag, many results - $this->get_page('post/list/size=640x480/1'); + $this->get_page('post/list/size=640x480/1'); $this->assert_title("size=640x480"); $this->assert_no_text("No Images Found"); @@ -68,13 +68,13 @@ class IndexTest extends ShimmieWebTestCase { $this->assert_no_text("No Images Found"); # multiple tags, many results - $this->get_page('post/list/computer%20size=640x480/1'); + $this->get_page('post/list/computer%20size=640x480/1'); $this->assert_title("computer size=640x480"); $this->assert_no_text("No Images Found"); # multiple tags, one of which doesn't exist # (test the "one tag doesn't exist = no hits" path) - $this->get_page('post/list/computer%20asdfasdfwaffle/1'); + $this->get_page('post/list/computer%20asdfasdfwaffle/1'); $this->assert_text("No Images Found"); # multiple tags, single result; search with one result = direct to image diff --git a/ext/setup/test.php b/ext/setup/test.php index 3b1a5e5d..c990f2ee 100644 --- a/ext/setup/test.php +++ b/ext/setup/test.php @@ -1,7 +1,7 @@ get_page('setup'); + $this->get_page('setup'); $this->assert_response(403); $this->assert_title("Permission Denied"); @@ -12,17 +12,17 @@ class SetupTest extends SCoreWebTestCase { $this->assertTrue($raw == "ok"); $this->log_in_as_user(); - $this->get_page('setup'); + $this->get_page('setup'); $this->assert_response(403); $this->assert_title("Permission Denied"); $this->log_out(); $this->log_in_as_admin(); - $this->get_page('setup'); + $this->get_page('setup'); $this->assert_title("Shimmie Setup"); $this->assert_text("General"); - $this->get_page('setup/advanced'); + $this->get_page('setup/advanced'); $this->assert_title("Shimmie Setup"); $this->assert_text("thumb_quality"); $this->log_out(); diff --git a/ext/view/test.php b/ext/view/test.php index 80a2f73a..a4d3db73 100644 --- a/ext/view/test.php +++ b/ext/view/test.php @@ -8,23 +8,23 @@ class ViewTest extends ShimmieWebTestCase { $idp1 = $image_id_3 + 1; $this->log_out(); - $this->get_page("post/view/$image_id_1"); - $this->assert_title("Image $image_id_1: test"); + $this->get_page("post/view/$image_id_1"); + $this->assert_title("Image $image_id_1: test"); $this->click("Prev"); - $this->assert_title("Image $image_id_2: test2"); + $this->assert_title("Image $image_id_2: test2"); $this->click("Next"); - $this->assert_title("Image $image_id_1: test"); + $this->assert_title("Image $image_id_1: test"); $this->click("Next"); - $this->assert_title("Image not found"); + $this->assert_title("Image not found"); - $this->get_page("post/view/$idp1"); - $this->assert_title('Image not found'); + $this->get_page("post/view/$idp1"); + $this->assert_title('Image not found'); - $this->get_page('post/view/-1'); - $this->assert_title('Image not found'); + $this->get_page('post/view/-1'); + $this->assert_title('Image not found'); # note: skips image #2 $this->get_page("post/view/$image_id_1?search=test"); // FIXME: assumes niceurls