mark tests as public
This commit is contained in:
parent
7f20b0527e
commit
85e5c7250b
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class AdminPageTest extends ShimmieWebTestCase {
|
class AdminPageTest extends ShimmieWebTestCase {
|
||||||
function testAuth() {
|
public function testAuth() {
|
||||||
$this->get_page('admin');
|
$this->get_page('admin');
|
||||||
$this->assert_response(403);
|
$this->assert_response(403);
|
||||||
$this->assert_title("Permission Denied");
|
$this->assert_title("Permission Denied");
|
||||||
@ -12,7 +12,7 @@ class AdminPageTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testLowercase() {
|
public function testLowercase() {
|
||||||
$ts = time(); // we need a tag that hasn't been used before
|
$ts = time(); // we need a tag that hasn't been used before
|
||||||
|
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
@ -33,7 +33,7 @@ class AdminPageTest extends ShimmieWebTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# FIXME: make sure the admin tools actually work
|
# FIXME: make sure the admin tools actually work
|
||||||
function testRecount() {
|
public function testRecount() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page('admin');
|
$this->get_page('admin');
|
||||||
$this->assert_title("Admin Tools");
|
$this->assert_title("Admin Tools");
|
||||||
@ -41,7 +41,7 @@ class AdminPageTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPurge() {
|
public function testPurge() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page('admin');
|
$this->get_page('admin');
|
||||||
$this->assert_title("Admin Tools");
|
$this->assert_title("Admin Tools");
|
||||||
@ -49,7 +49,7 @@ class AdminPageTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDump() {
|
public function testDump() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page('admin');
|
$this->get_page('admin');
|
||||||
$this->assert_title("Admin Tools");
|
$this->assert_title("Admin Tools");
|
||||||
@ -58,7 +58,7 @@ class AdminPageTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDBQ() {
|
public function testDBQ() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
|
$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");
|
$image_id_2 = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "test2");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class AliasEditorTest extends ShimmieWebTestCase {
|
class AliasEditorTest extends ShimmieWebTestCase {
|
||||||
function testAliasEditor() {
|
public function testAliasEditor() {
|
||||||
$this->get_page('alias/list');
|
$this->get_page('alias/list');
|
||||||
$this->assert_title("Alias List");
|
$this->assert_title("Alias List");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ArtistTest extends ShimmieWebTestCase {
|
class ArtistTest extends ShimmieWebTestCase {
|
||||||
function testSearch() {
|
public function testSearch() {
|
||||||
# FIXME: check that the results are there
|
# FIXME: check that the results are there
|
||||||
$this->get_page("post/list/author=bob/1");
|
$this->get_page("post/list/author=bob/1");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BanWordsTest extends ShimmieWebTestCase {
|
class BanWordsTest extends ShimmieWebTestCase {
|
||||||
function testWordBan() {
|
public function testWordBan() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_banned_words", "viagra\nporn\n\n/http:.*\.cn\//");
|
$this->set_field("_config_banned_words", "viagra\nporn\n\n/http:.*\.cn\//");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BlocksTest extends SCoreWebTestCase {
|
class BlocksTest extends SCoreWebTestCase {
|
||||||
function testBlocks() {
|
public function testBlocks() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page("blocks/list");
|
$this->get_page("blocks/list");
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
class BlotterTest extends SCoreWebTestCase {
|
class BlotterTest extends SCoreWebTestCase {
|
||||||
function testLogin() {
|
public function testLogin() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->assert_text("Blotter Editor");
|
$this->assert_text("Blotter Editor");
|
||||||
$this->click("Blotter Editor");
|
$this->click("Blotter Editor");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDenial() {
|
public function testDenial() {
|
||||||
$this->get_page("blotter/editor");
|
$this->get_page("blotter/editor");
|
||||||
$this->assert_response(403);
|
$this->assert_response(403);
|
||||||
$this->get_page("blotter/add");
|
$this->get_page("blotter/add");
|
||||||
@ -16,7 +16,7 @@ class BlotterTest extends SCoreWebTestCase {
|
|||||||
$this->assert_response(403);
|
$this->assert_response(403);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAddViewRemove() {
|
public function testAddViewRemove() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page("blotter/editor");
|
$this->get_page("blotter/editor");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BookmarksTest extends ShimmieWebTestCase {
|
class BookmarksTest extends ShimmieWebTestCase {
|
||||||
function testBookmarks() {
|
public function testBookmarks() {
|
||||||
$this->get_page("bookmark/add");
|
$this->get_page("bookmark/add");
|
||||||
$this->get_page("bookmark/remove");
|
$this->get_page("bookmark/remove");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BrowserSearchTest extends SCoreWebTestCase {
|
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/please_dont_use_this_tag_as_it_would_break_stuff__search.xml");
|
||||||
$this->get_page("browser_search/test");
|
$this->get_page("browser_search/test");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BulkAddTest extends ShimmieWebTestCase {
|
class BulkAddTest extends ShimmieWebTestCase {
|
||||||
function testBulkAdd() {
|
public function testBulkAdd() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page('admin');
|
$this->get_page('admin');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class CommentListTest extends ShimmieWebTestCase {
|
class CommentListTest extends ShimmieWebTestCase {
|
||||||
function setUp() {
|
public function setUp() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_comment_limit", "100");
|
$this->set_field("_config_comment_limit", "100");
|
||||||
@ -8,7 +8,7 @@ class CommentListTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function tearDown() {
|
public function tearDown() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_comment_limit", "10");
|
$this->set_field("_config_comment_limit", "10");
|
||||||
@ -16,7 +16,7 @@ class CommentListTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCommentsPage() {
|
public function testCommentsPage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$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');
|
$this->assert_no_text('ASDFASDF');
|
||||||
}
|
}
|
||||||
|
|
||||||
function testSingleDel() {
|
public function testSingleDel() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class DanbooruApiTest extends ShimmieWebTestCase {
|
class DanbooruApiTest extends ShimmieWebTestCase {
|
||||||
function testSearch() {
|
public function testSearch() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$image_id = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "data");
|
$image_id = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "data");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class DowntimeTest extends SCoreWebTestCase {
|
class DowntimeTest extends SCoreWebTestCase {
|
||||||
function testDowntime() {
|
public function testDowntime() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_downtime", true);
|
$this->set_field("_config_downtime", true);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class EmoticonTest extends ShimmieWebTestCase {
|
class EmoticonTest extends ShimmieWebTestCase {
|
||||||
function testEmoticons() {
|
public function testEmoticons() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
$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");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ETTest extends ShimmieWebTestCase {
|
class ETTest extends ShimmieWebTestCase {
|
||||||
function testET() {
|
public function testET() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("system_info");
|
$this->get_page("system_info");
|
||||||
$this->assert_title("System Info");
|
$this->assert_title("System Info");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ExtManagerTest extends SCoreWebTestCase {
|
class ExtManagerTest extends SCoreWebTestCase {
|
||||||
function testAuth() {
|
public function testAuth() {
|
||||||
$this->get_page('ext_manager');
|
$this->get_page('ext_manager');
|
||||||
$this->assert_title("Extensions");
|
$this->assert_title("Extensions");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class FavoritesTest extends ShimmieWebTestCase {
|
class FavoritesTest extends ShimmieWebTestCase {
|
||||||
function testFavorites() {
|
public function testFavorites() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class FeaturedTest extends ShimmieWebTestCase {
|
class FeaturedTest extends ShimmieWebTestCase {
|
||||||
function testFeatured() {
|
public function testFeatured() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class Handle404Test extends SCoreWebTestCase {
|
class Handle404Test extends SCoreWebTestCase {
|
||||||
function test404Handler() {
|
public function test404Handler() {
|
||||||
$this->get_page('not/a/page');
|
$this->get_page('not/a/page');
|
||||||
$this->assert_response(404);
|
$this->assert_response(404);
|
||||||
$this->assert_title('404');
|
$this->assert_title('404');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class IcoHandlerTest extends ShimmieWebTestCase {
|
class IcoHandlerTest extends ShimmieWebTestCase {
|
||||||
function testPixelHander() {
|
public function testPixelHander() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("lib/static/favicon.ico", "shimmie favicon");
|
$image_id = $this->post_image("lib/static/favicon.ico", "shimmie favicon");
|
||||||
$this->assert_response(302);
|
$this->assert_response(302);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class PixelHandlerTest extends ShimmieWebTestCase {
|
class PixelHandlerTest extends ShimmieWebTestCase {
|
||||||
function testPixelHander() {
|
public function testPixelHander() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||||
$this->assert_response(302);
|
$this->assert_response(302);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class SVGHandlerTest extends ShimmieWebTestCase {
|
class SVGHandlerTest extends ShimmieWebTestCase {
|
||||||
function testSVGHander() {
|
public function testSVGHander() {
|
||||||
file_put_contents("test.svg", '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
file_put_contents("test.svg", '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class HomeTest extends ShimmieWebTestCase {
|
class HomeTest extends ShimmieWebTestCase {
|
||||||
function testHomePage() {
|
public function testHomePage() {
|
||||||
$this->get_page('home');
|
$this->get_page('home');
|
||||||
$this->assert_title('Shimmie');
|
$this->assert_title('Shimmie');
|
||||||
$this->assert_text('Shimmie');
|
$this->assert_text('Shimmie');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class HashBanTest extends ShimmieWebTestCase {
|
class HashBanTest extends ShimmieWebTestCase {
|
||||||
function testBan() {
|
public function testBan() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class IndexTest extends ShimmieWebTestCase {
|
class IndexTest extends ShimmieWebTestCase {
|
||||||
function testIndexPage() {
|
public function testIndexPage() {
|
||||||
$this->get_page('post/list');
|
$this->get_page('post/list');
|
||||||
$this->assert_title("Welcome to Shimmie ".VERSION);
|
$this->assert_title("Welcome to Shimmie ".VERSION);
|
||||||
$this->assert_no_text("Prev | Index | Next");
|
$this->assert_no_text("Prev | Index | Next");
|
||||||
@ -32,7 +32,7 @@ class IndexTest extends ShimmieWebTestCase {
|
|||||||
# FIXME: test search box
|
# FIXME: test search box
|
||||||
}
|
}
|
||||||
|
|
||||||
function testSearches() {
|
public function testSearches() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
$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");
|
$image_id_2 = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "computer bedroom workshop");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class IPBanTest extends SCoreWebTestCase {
|
class IPBanTest extends SCoreWebTestCase {
|
||||||
function testIPBan() {
|
public function testIPBan() {
|
||||||
$this->get_page('ip_ban/list');
|
$this->get_page('ip_ban/list');
|
||||||
$this->assert_response(403);
|
$this->assert_response(403);
|
||||||
$this->assert_title("Permission Denied");
|
$this->assert_title("Permission Denied");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class LinkImageTest extends ShimmieWebTestCase {
|
class LinkImageTest extends ShimmieWebTestCase {
|
||||||
function testLinkImage() {
|
public function testLinkImage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pie");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pie");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class LogDatabaseTest extends SCoreWebTestCase {
|
class LogDatabaseTest extends SCoreWebTestCase {
|
||||||
function testLog() {
|
public function testLog() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("log/view");
|
$this->get_page("log/view");
|
||||||
$this->get_page("log/view?module=core-image");
|
$this->get_page("log/view?module=core-image");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class NumericScoreTest extends ShimmieWebTestCase {
|
class NumericScoreTest extends ShimmieWebTestCase {
|
||||||
function testNumericScore() {
|
public function testNumericScore() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
$this->get_page("post/view/$image_id");
|
$this->get_page("post/view/$image_id");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class OekakiTest extends SCoreWebTestCase {
|
class OekakiTest extends SCoreWebTestCase {
|
||||||
function testLog() {
|
public function testLog() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$this->get_page("oekaki/create");
|
$this->get_page("oekaki/create");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class PrivMsgTest extends SCoreWebTestCase {
|
class PrivMsgTest extends SCoreWebTestCase {
|
||||||
function testPM() {
|
public function testPM() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("user/test");
|
$this->get_page("user/test");
|
||||||
$this->set_field('subject', "message demo to test");
|
$this->set_field('subject', "message demo to test");
|
||||||
@ -28,7 +28,7 @@ class PrivMsgTest extends SCoreWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAdminAccess() {
|
public function testAdminAccess() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("user/test");
|
$this->get_page("user/test");
|
||||||
$this->set_field('subject', "message demo to test");
|
$this->set_field('subject', "message demo to test");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class PoolsTest extends ShimmieWebTestCase {
|
class PoolsTest extends ShimmieWebTestCase {
|
||||||
function testPools() {
|
public function testPools() {
|
||||||
$this->get_page('pool/list');
|
$this->get_page('pool/list');
|
||||||
$this->assert_title("Pools");
|
$this->assert_title("Pools");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class RandomTest extends ShimmieWebTestCase {
|
class RandomTest extends ShimmieWebTestCase {
|
||||||
function testRandom() {
|
public function testRandom() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
@ -19,7 +19,7 @@ class RandomTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPostListBlock() {
|
public function testPostListBlock() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_show_random_block", true);
|
$this->set_field("_config_show_random_block", true);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class RatingTest extends ShimmieWebTestCase {
|
class RatingTest extends ShimmieWebTestCase {
|
||||||
function testRating() {
|
public function testRating() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class RegenThumbTest extends ShimmieWebTestCase {
|
class RegenThumbTest extends ShimmieWebTestCase {
|
||||||
function testRegenThumb() {
|
public function testRegenThumb() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
$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");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ReportImageTest extends ShimmieWebTestCase {
|
class ReportImageTest extends ShimmieWebTestCase {
|
||||||
function testReportImage() {
|
public function testReportImage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
|
$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");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ResLimitTest extends ShimmieWebTestCase {
|
class ResLimitTest extends ShimmieWebTestCase {
|
||||||
function testResLimitOK() {
|
public function testResLimitOK() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_upload_min_height", "0");
|
$this->set_field("_config_upload_min_height", "0");
|
||||||
@ -24,7 +24,7 @@ class ResLimitTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testResLimitSmall() {
|
public function testResLimitSmall() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_upload_min_height", "900");
|
$this->set_field("_config_upload_min_height", "900");
|
||||||
@ -48,7 +48,7 @@ class ResLimitTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testResLimitLarge() {
|
public function testResLimitLarge() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_upload_min_height", "0");
|
$this->set_field("_config_upload_min_height", "0");
|
||||||
@ -72,7 +72,7 @@ class ResLimitTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testResLimitRatio() {
|
public function testResLimitRatio() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_upload_min_height", "-1");
|
$this->set_field("_config_upload_min_height", "-1");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class SetupTest extends SCoreWebTestCase {
|
class SetupTest extends SCoreWebTestCase {
|
||||||
function testAuth() {
|
public function testAuth() {
|
||||||
$this->get_page('setup');
|
$this->get_page('setup');
|
||||||
$this->assert_response(403);
|
$this->assert_response(403);
|
||||||
$this->assert_title("Permission Denied");
|
$this->assert_title("Permission Denied");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ShimmieApiTest extends ShimmieWebTestCase {
|
class ShimmieApiTest extends ShimmieWebTestCase {
|
||||||
function testAPI() {
|
public function testAPI() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class SiteDescriptionTest extends SCoreWebTestCase {
|
class SiteDescriptionTest extends SCoreWebTestCase {
|
||||||
function testSiteDescription() {
|
public function testSiteDescription() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page('setup');
|
$this->get_page('setup');
|
||||||
$this->assert_title("Shimmie Setup");
|
$this->assert_title("Shimmie Setup");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class XMLSitemapTest extends ShimmieWebTestCase {
|
class XMLSitemapTest extends ShimmieWebTestCase {
|
||||||
function testBasic() {
|
public function testBasic() {
|
||||||
# this will implicitly check that there are no
|
# this will implicitly check that there are no
|
||||||
# PHP-level error messages
|
# PHP-level error messages
|
||||||
$this->get_page('sitemap.xml');
|
$this->get_page('sitemap.xml');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class TagEditTest extends ShimmieWebTestCase {
|
class TagEditTest extends ShimmieWebTestCase {
|
||||||
function testTagEdit() {
|
public function testTagEdit() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
$this->get_page("post/view/$image_id");
|
$this->get_page("post/view/$image_id");
|
||||||
@ -18,7 +18,7 @@ class TagEditTest extends ShimmieWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testSourceEdit() {
|
public function testSourceEdit() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
$this->get_page("post/view/$image_id");
|
$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.
|
* FIXME: Mass Tagger seems to be broken, and this test case always fails.
|
||||||
*
|
*
|
||||||
function testMassEdit() {
|
public function testMassEdit() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class TagHistoryTest extends ShimmieWebTestCase {
|
class TagHistoryTest extends ShimmieWebTestCase {
|
||||||
function testTagHistory() {
|
public function testTagHistory() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
|
||||||
$this->get_page("post/view/$image_id");
|
$this->get_page("post/view/$image_id");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
class TagListTest extends ShimmieWebTestCase {
|
class TagListTest extends ShimmieWebTestCase {
|
||||||
var $pages = array("map", "alphabetic", "popularity", "categories");
|
var $pages = array("map", "alphabetic", "popularity", "categories");
|
||||||
|
|
||||||
function testTagList() {
|
public function testTagList() {
|
||||||
$this->get_page('tags/map');
|
$this->get_page('tags/map');
|
||||||
$this->assert_title('Tag List');
|
$this->assert_title('Tag List');
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class TagListTest extends ShimmieWebTestCase {
|
|||||||
# FIXME: test that these show the right stuff
|
# FIXME: test that these show the right stuff
|
||||||
}
|
}
|
||||||
|
|
||||||
function testMinCount() {
|
public function testMinCount() {
|
||||||
foreach($this->pages as $page) {
|
foreach($this->pages as $page) {
|
||||||
$this->get_page("tags/$page?mincount=999999");
|
$this->get_page("tags/$page?mincount=999999");
|
||||||
$this->assert_title("Tag List");
|
$this->assert_title("Tag List");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class TipsTest extends SCoreWebTestCase {
|
class TipsTest extends SCoreWebTestCase {
|
||||||
function setUp() {
|
public function setUp() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$raw = $this->get_page("tips/list");
|
$raw = $this->get_page("tips/list");
|
||||||
// get rid of the default data if it's there
|
// get rid of the default data if it's there
|
||||||
@ -10,7 +10,7 @@ class TipsTest extends SCoreWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testImageless() {
|
public function testImageless() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page("tips/list");
|
$this->get_page("tips/list");
|
||||||
@ -29,7 +29,7 @@ class TipsTest extends SCoreWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testImaged() {
|
public function testImaged() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page("tips/list");
|
$this->get_page("tips/list");
|
||||||
@ -48,7 +48,7 @@ class TipsTest extends SCoreWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDisabled() {
|
public function testDisabled() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page("tips/list");
|
$this->get_page("tips/list");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class UploadTest extends ShimmieWebTestCase {
|
class UploadTest extends ShimmieWebTestCase {
|
||||||
function testUpload() {
|
public function testUpload() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
|
|
||||||
$this->get_page("upload");
|
$this->get_page("upload");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class UserPageTest extends SCoreWebTestCase {
|
class UserPageTest extends SCoreWebTestCase {
|
||||||
function testUserPage() {
|
public function testUserPage() {
|
||||||
$this->get_page('user');
|
$this->get_page('user');
|
||||||
$this->assert_title("Not Logged In");
|
$this->assert_title("Not Logged In");
|
||||||
$this->assert_no_text("Options");
|
$this->assert_no_text("Options");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ViewTest extends ShimmieWebTestCase {
|
class ViewTest extends ShimmieWebTestCase {
|
||||||
function testViewPage() {
|
public function testViewPage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id_1 = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "test");
|
$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");
|
$image_id_2 = $this->post_image("ext/simpletest/data/bedroom_workshop.jpg", "test2");
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
class WikiTest extends SCoreWebTestCase {
|
class WikiTest extends SCoreWebTestCase {
|
||||||
function testIndex() {
|
public function testIndex() {
|
||||||
$this->get_page("wiki");
|
$this->get_page("wiki");
|
||||||
$this->assert_title("Index");
|
$this->assert_title("Index");
|
||||||
$this->assert_text("This is a default page");
|
$this->assert_text("This is a default page");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAccess() {
|
public function testAccess() {
|
||||||
foreach(array("anon", "user", "admin") as $user) {
|
foreach(array("anon", "user", "admin") as $user) {
|
||||||
foreach(array(false, true) as $allowed) {
|
foreach(array(false, true) as $allowed) {
|
||||||
// admin has no settings to set
|
// 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->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_wiki_edit_anon", false);
|
$this->set_field("_config_wiki_edit_anon", false);
|
||||||
@ -72,7 +72,7 @@ class WikiTest extends SCoreWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDefault() {
|
public function testDefault() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("wiki/wiki:default");
|
$this->get_page("wiki/wiki:default");
|
||||||
$this->assert_title("wiki:default");
|
$this->assert_title("wiki:default");
|
||||||
@ -89,7 +89,7 @@ class WikiTest extends SCoreWebTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRevisions() {
|
public function testRevisions() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("wiki/test");
|
$this->get_page("wiki/test");
|
||||||
$this->assert_title("test");
|
$this->assert_title("test");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class WordFilterTest extends ShimmieWebTestCase {
|
class WordFilterTest extends ShimmieWebTestCase {
|
||||||
function testWordFilter() {
|
public function testWordFilter() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
$this->set_field("_config_word_filter", "whore,nice lady\na duck,a kitten\n white ,\tspace\ninvalid");
|
$this->set_field("_config_word_filter", "whore,nice lady\na duck,a kitten\n white ,\tspace\ninvalid");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user