mark tests as public

This commit is contained in:
Shish 2015-09-26 11:11:26 +01:00
parent 7f20b0527e
commit 85e5c7250b
49 changed files with 75 additions and 75 deletions

View File

@ -1,6 +1,6 @@
<?php
class AdminPageTest extends ShimmieWebTestCase {
function testAuth() {
public function testAuth() {
$this->get_page('admin');
$this->assert_response(403);
$this->assert_title("Permission Denied");
@ -12,7 +12,7 @@ class AdminPageTest extends ShimmieWebTestCase {
$this->log_out();
}
function testLowercase() {
public function testLowercase() {
$ts = time(); // we need a tag that hasn't been used before
$this->log_in_as_admin();
@ -33,7 +33,7 @@ class AdminPageTest extends ShimmieWebTestCase {
}
# FIXME: make sure the admin tools actually work
function testRecount() {
public function testRecount() {
$this->log_in_as_admin();
$this->get_page('admin');
$this->assert_title("Admin Tools");
@ -41,7 +41,7 @@ class AdminPageTest extends ShimmieWebTestCase {
$this->log_out();
}
function testPurge() {
public function testPurge() {
$this->log_in_as_admin();
$this->get_page('admin');
$this->assert_title("Admin Tools");
@ -49,7 +49,7 @@ class AdminPageTest extends ShimmieWebTestCase {
$this->log_out();
}
function testDump() {
public function testDump() {
$this->log_in_as_admin();
$this->get_page('admin');
$this->assert_title("Admin Tools");
@ -58,7 +58,7 @@ class AdminPageTest extends ShimmieWebTestCase {
$this->log_out();
}
function testDBQ() {
public function testDBQ() {
$this->log_in_as_user();
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
$image_id_2 = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "test2");

View File

@ -1,6 +1,6 @@
<?php
class AliasEditorTest extends ShimmieWebTestCase {
function testAliasEditor() {
public function testAliasEditor() {
$this->get_page('alias/list');
$this->assert_title("Alias List");

View File

@ -1,6 +1,6 @@
<?php
class ArtistTest extends ShimmieWebTestCase {
function testSearch() {
public function testSearch() {
# FIXME: check that the results are there
$this->get_page("post/list/author=bob/1");
}

View File

@ -1,6 +1,6 @@
<?php
class BanWordsTest extends ShimmieWebTestCase {
function testWordBan() {
public function testWordBan() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_banned_words", "viagra\nporn\n\n/http:.*\.cn\//");

View File

@ -1,6 +1,6 @@
<?php
class BlocksTest extends SCoreWebTestCase {
function testBlocks() {
public function testBlocks() {
$this->log_in_as_admin();
$this->get_page("blocks/list");

View File

@ -1,13 +1,13 @@
<?php
class BlotterTest extends SCoreWebTestCase {
function testLogin() {
public function testLogin() {
$this->log_in_as_admin();
$this->assert_text("Blotter Editor");
$this->click("Blotter Editor");
$this->log_out();
}
function testDenial() {
public function testDenial() {
$this->get_page("blotter/editor");
$this->assert_response(403);
$this->get_page("blotter/add");
@ -16,7 +16,7 @@ class BlotterTest extends SCoreWebTestCase {
$this->assert_response(403);
}
function testAddViewRemove() {
public function testAddViewRemove() {
$this->log_in_as_admin();
$this->get_page("blotter/editor");

View File

@ -1,6 +1,6 @@
<?php
class BookmarksTest extends ShimmieWebTestCase {
function testBookmarks() {
public function testBookmarks() {
$this->get_page("bookmark/add");
$this->get_page("bookmark/remove");
}

View File

@ -1,6 +1,6 @@
<?php
class BrowserSearchTest extends SCoreWebTestCase {
function testBasic() {
public function testBasic() {
$this->get_page("browser_search/please_dont_use_this_tag_as_it_would_break_stuff__search.xml");
$this->get_page("browser_search/test");
}

View File

@ -1,6 +1,6 @@
<?php
class BulkAddTest extends ShimmieWebTestCase {
function testBulkAdd() {
public function testBulkAdd() {
$this->log_in_as_admin();
$this->get_page('admin');

View File

@ -1,6 +1,6 @@
<?php
class CommentListTest extends ShimmieWebTestCase {
function setUp() {
public function setUp() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_comment_limit", "100");
@ -8,7 +8,7 @@ class CommentListTest extends ShimmieWebTestCase {
$this->log_out();
}
function tearDown() {
public function tearDown() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_comment_limit", "10");
@ -16,7 +16,7 @@ class CommentListTest extends ShimmieWebTestCase {
$this->log_out();
}
function testCommentsPage() {
public function testCommentsPage() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
@ -80,7 +80,7 @@ class CommentListTest extends ShimmieWebTestCase {
$this->assert_no_text('ASDFASDF');
}
function testSingleDel() {
public function testSingleDel() {
$this->log_in_as_admin();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");

View File

@ -1,6 +1,6 @@
<?php
class DanbooruApiTest extends ShimmieWebTestCase {
function testSearch() {
public function testSearch() {
$this->log_in_as_admin();
$image_id = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "data");

View File

@ -1,6 +1,6 @@
<?php
class DowntimeTest extends SCoreWebTestCase {
function testDowntime() {
public function testDowntime() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_downtime", true);

View File

@ -1,6 +1,6 @@
<?php
class EmoticonTest extends ShimmieWebTestCase {
function testEmoticons() {
public function testEmoticons() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->get_page("post/view/$image_id");

View File

@ -1,6 +1,6 @@
<?php
class ETTest extends ShimmieWebTestCase {
function testET() {
public function testET() {
$this->log_in_as_admin();
$this->get_page("system_info");
$this->assert_title("System Info");

View File

@ -1,6 +1,6 @@
<?php
class ExtManagerTest extends SCoreWebTestCase {
function testAuth() {
public function testAuth() {
$this->get_page('ext_manager');
$this->assert_title("Extensions");

View File

@ -1,6 +1,6 @@
<?php
class FavoritesTest extends ShimmieWebTestCase {
function testFavorites() {
public function testFavorites() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");

View File

@ -1,6 +1,6 @@
<?php
class FeaturedTest extends ShimmieWebTestCase {
function testFeatured() {
public function testFeatured() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->log_out();

View File

@ -1,6 +1,6 @@
<?php
class Handle404Test extends SCoreWebTestCase {
function test404Handler() {
public function test404Handler() {
$this->get_page('not/a/page');
$this->assert_response(404);
$this->assert_title('404');

View File

@ -1,6 +1,6 @@
<?php
class IcoHandlerTest extends ShimmieWebTestCase {
function testPixelHander() {
public function testPixelHander() {
$this->log_in_as_user();
$image_id = $this->post_image("lib/static/favicon.ico", "shimmie favicon");
$this->assert_response(302);

View File

@ -1,6 +1,6 @@
<?php
class PixelHandlerTest extends ShimmieWebTestCase {
function testPixelHander() {
public function testPixelHander() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->assert_response(302);

View File

@ -1,6 +1,6 @@
<?php
class SVGHandlerTest extends ShimmieWebTestCase {
function testSVGHander() {
public function testSVGHander() {
file_put_contents("test.svg", '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"

View File

@ -1,6 +1,6 @@
<?php
class HomeTest extends ShimmieWebTestCase {
function testHomePage() {
public function testHomePage() {
$this->get_page('home');
$this->assert_title('Shimmie');
$this->assert_text('Shimmie');

View File

@ -1,6 +1,6 @@
<?php
class HashBanTest extends ShimmieWebTestCase {
function testBan() {
public function testBan() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->log_out();

View File

@ -1,6 +1,6 @@
<?php
class IndexTest extends ShimmieWebTestCase {
function testIndexPage() {
public function testIndexPage() {
$this->get_page('post/list');
$this->assert_title("Welcome to Shimmie ".VERSION);
$this->assert_no_text("Prev | Index | Next");
@ -32,7 +32,7 @@ class IndexTest extends ShimmieWebTestCase {
# FIXME: test search box
}
function testSearches() {
public function testSearches() {
$this->log_in_as_user();
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$image_id_2 = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "computer bedroom workshop");

View File

@ -1,6 +1,6 @@
<?php
class IPBanTest extends SCoreWebTestCase {
function testIPBan() {
public function testIPBan() {
$this->get_page('ip_ban/list');
$this->assert_response(403);
$this->assert_title("Permission Denied");

View File

@ -1,6 +1,6 @@
<?php
class LinkImageTest extends ShimmieWebTestCase {
function testLinkImage() {
public function testLinkImage() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pie");

View File

@ -1,6 +1,6 @@
<?php
class LogDatabaseTest extends SCoreWebTestCase {
function testLog() {
public function testLog() {
$this->log_in_as_admin();
$this->get_page("log/view");
$this->get_page("log/view?module=core-image");

View File

@ -1,6 +1,6 @@
<?php
class NumericScoreTest extends ShimmieWebTestCase {
function testNumericScore() {
public function testNumericScore() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");

View File

@ -1,6 +1,6 @@
<?php
class OekakiTest extends SCoreWebTestCase {
function testLog() {
public function testLog() {
$this->log_in_as_user();
$this->get_page("oekaki/create");
$this->log_out();

View File

@ -1,6 +1,6 @@
<?php
class PrivMsgTest extends SCoreWebTestCase {
function testPM() {
public function testPM() {
$this->log_in_as_admin();
$this->get_page("user/test");
$this->set_field('subject', "message demo to test");
@ -28,7 +28,7 @@ class PrivMsgTest extends SCoreWebTestCase {
$this->log_out();
}
function testAdminAccess() {
public function testAdminAccess() {
$this->log_in_as_admin();
$this->get_page("user/test");
$this->set_field('subject', "message demo to test");

View File

@ -1,6 +1,6 @@
<?php
class PoolsTest extends ShimmieWebTestCase {
function testPools() {
public function testPools() {
$this->get_page('pool/list');
$this->assert_title("Pools");

View File

@ -1,6 +1,6 @@
<?php
class RandomTest extends ShimmieWebTestCase {
function testRandom() {
public function testRandom() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
$this->log_out();
@ -19,7 +19,7 @@ class RandomTest extends ShimmieWebTestCase {
$this->log_out();
}
function testPostListBlock() {
public function testPostListBlock() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_show_random_block", true);

View File

@ -1,6 +1,6 @@
<?php
class RatingTest extends ShimmieWebTestCase {
function testRating() {
public function testRating() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");

View File

@ -1,6 +1,6 @@
<?php
class RegenThumbTest extends ShimmieWebTestCase {
function testRegenThumb() {
public 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");

View File

@ -1,6 +1,6 @@
<?php
class ReportImageTest extends ShimmieWebTestCase {
function testReportImage() {
public function testReportImage() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->get_page("post/view/$image_id");

View File

@ -1,6 +1,6 @@
<?php
class ResLimitTest extends ShimmieWebTestCase {
function testResLimitOK() {
public function testResLimitOK() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_upload_min_height", "0");
@ -24,7 +24,7 @@ class ResLimitTest extends ShimmieWebTestCase {
$this->log_out();
}
function testResLimitSmall() {
public function testResLimitSmall() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_upload_min_height", "900");
@ -48,7 +48,7 @@ class ResLimitTest extends ShimmieWebTestCase {
$this->log_out();
}
function testResLimitLarge() {
public function testResLimitLarge() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_upload_min_height", "0");
@ -72,7 +72,7 @@ class ResLimitTest extends ShimmieWebTestCase {
$this->log_out();
}
function testResLimitRatio() {
public function testResLimitRatio() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_upload_min_height", "-1");

View File

@ -1,6 +1,6 @@
<?php
class SetupTest extends SCoreWebTestCase {
function testAuth() {
public function testAuth() {
$this->get_page('setup');
$this->assert_response(403);
$this->assert_title("Permission Denied");

View File

@ -1,6 +1,6 @@
<?php
class ShimmieApiTest extends ShimmieWebTestCase {
function testAPI() {
public function testAPI() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");

View File

@ -1,6 +1,6 @@
<?php
class SiteDescriptionTest extends SCoreWebTestCase {
function testSiteDescription() {
public function testSiteDescription() {
$this->log_in_as_admin();
$this->get_page('setup');
$this->assert_title("Shimmie Setup");

View File

@ -1,6 +1,6 @@
<?php
class XMLSitemapTest extends ShimmieWebTestCase {
function testBasic() {
public function testBasic() {
# this will implicitly check that there are no
# PHP-level error messages
$this->get_page('sitemap.xml');

View File

@ -1,6 +1,6 @@
<?php
class TagEditTest extends ShimmieWebTestCase {
function testTagEdit() {
public function testTagEdit() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");
@ -18,7 +18,7 @@ class TagEditTest extends ShimmieWebTestCase {
$this->log_out();
}
function testSourceEdit() {
public function testSourceEdit() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");
@ -46,7 +46,7 @@ class TagEditTest extends ShimmieWebTestCase {
/*
* FIXME: Mass Tagger seems to be broken, and this test case always fails.
*
function testMassEdit() {
public function testMassEdit() {
$this->log_in_as_admin();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");

View File

@ -1,6 +1,6 @@
<?php
class TagHistoryTest extends ShimmieWebTestCase {
function testTagHistory() {
public function testTagHistory() {
$this->log_in_as_admin();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");

View File

@ -2,7 +2,7 @@
class TagListTest extends ShimmieWebTestCase {
var $pages = array("map", "alphabetic", "popularity", "categories");
function testTagList() {
public function testTagList() {
$this->get_page('tags/map');
$this->assert_title('Tag List');
@ -18,7 +18,7 @@ class TagListTest extends ShimmieWebTestCase {
# FIXME: test that these show the right stuff
}
function testMinCount() {
public function testMinCount() {
foreach($this->pages as $page) {
$this->get_page("tags/$page?mincount=999999");
$this->assert_title("Tag List");

View File

@ -1,6 +1,6 @@
<?php
class TipsTest extends SCoreWebTestCase {
function setUp() {
public function setUp() {
$this->log_in_as_admin();
$raw = $this->get_page("tips/list");
// get rid of the default data if it's there
@ -10,7 +10,7 @@ class TipsTest extends SCoreWebTestCase {
$this->log_out();
}
function testImageless() {
public function testImageless() {
$this->log_in_as_admin();
$this->get_page("tips/list");
@ -29,7 +29,7 @@ class TipsTest extends SCoreWebTestCase {
$this->log_out();
}
function testImaged() {
public function testImaged() {
$this->log_in_as_admin();
$this->get_page("tips/list");
@ -48,7 +48,7 @@ class TipsTest extends SCoreWebTestCase {
$this->log_out();
}
function testDisabled() {
public function testDisabled() {
$this->log_in_as_admin();
$this->get_page("tips/list");

View File

@ -1,6 +1,6 @@
<?php
class UploadTest extends ShimmieWebTestCase {
function testUpload() {
public function testUpload() {
$this->log_in_as_user();
$this->get_page("upload");

View File

@ -1,6 +1,6 @@
<?php
class UserPageTest extends SCoreWebTestCase {
function testUserPage() {
public function testUserPage() {
$this->get_page('user');
$this->assert_title("Not Logged In");
$this->assert_no_text("Options");

View File

@ -1,6 +1,6 @@
<?php
class ViewTest extends ShimmieWebTestCase {
function testViewPage() {
public function testViewPage() {
$this->log_in_as_user();
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
$image_id_2 = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "test2");

View File

@ -1,12 +1,12 @@
<?php
class WikiTest extends SCoreWebTestCase {
function testIndex() {
public function testIndex() {
$this->get_page("wiki");
$this->assert_title("Index");
$this->assert_text("This is a default page");
}
function testAccess() {
public function testAccess() {
foreach(array("anon", "user", "admin") as $user) {
foreach(array(false, true) as $allowed) {
// admin has no settings to set
@ -38,7 +38,7 @@ class WikiTest extends SCoreWebTestCase {
}
}
function testLock() {
public function testLock() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_wiki_edit_anon", false);
@ -72,7 +72,7 @@ class WikiTest extends SCoreWebTestCase {
$this->log_out();
}
function testDefault() {
public function testDefault() {
$this->log_in_as_admin();
$this->get_page("wiki/wiki:default");
$this->assert_title("wiki:default");
@ -89,7 +89,7 @@ class WikiTest extends SCoreWebTestCase {
$this->log_out();
}
function testRevisions() {
public function testRevisions() {
$this->log_in_as_admin();
$this->get_page("wiki/test");
$this->assert_title("test");

View File

@ -1,6 +1,6 @@
<?php
class WordFilterTest extends ShimmieWebTestCase {
function testWordFilter() {
public function testWordFilter() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->set_field("_config_word_filter", "whore,nice lady\na duck,a kitten\n white ,\tspace\ninvalid");