mark tests as public
This commit is contained in:
parent
c54e336695
commit
8c1e3bc92a
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class AdminPageTest extends ShimmiePHPUnitTestCase {
|
class AdminPageTest extends ShimmiePHPUnitTestCase {
|
||||||
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");
|
||||||
@ -16,7 +16,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_title("Admin Tools");
|
$this->assert_title("Admin Tools");
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
@ -37,7 +37,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 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");
|
||||||
@ -46,7 +46,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase {
|
|||||||
send_event(new AdminActionEvent('recount_tag_use'));
|
send_event(new AdminActionEvent('recount_tag_use'));
|
||||||
}
|
}
|
||||||
|
|
||||||
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");
|
||||||
@ -57,7 +57,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase {
|
|||||||
//$this->assert_response(200);
|
//$this->assert_response(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDBQ() {
|
public function testDBQ() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||||
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
class AliasEditorTest extends ShimmiePHPUnitTestCase {
|
class AliasEditorTest extends ShimmiePHPUnitTestCase {
|
||||||
function testAliasList() {
|
public function testAliasList() {
|
||||||
$this->get_page('alias/list');
|
$this->get_page('alias/list');
|
||||||
$this->assert_response(200);
|
$this->assert_response(200);
|
||||||
$this->assert_title("Alias List");
|
$this->assert_title("Alias List");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAliasListReadOnly() {
|
public function testAliasListReadOnly() {
|
||||||
// Check that normal users can't add aliases.
|
// Check that normal users can't add aliases.
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$this->get_page('alias/list');
|
$this->get_page('alias/list');
|
||||||
@ -14,7 +14,7 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_no_text("Add");
|
$this->assert_no_text("Add");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAliasEditor() {
|
public function testAliasEditor() {
|
||||||
/*
|
/*
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
* FIXME: TODO:
|
* FIXME: TODO:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ArtistTest extends ShimmiePHPUnitTestCase {
|
class ArtistTest extends ShimmiePHPUnitTestCase {
|
||||||
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");
|
||||||
#$this->assert_response(200);
|
#$this->assert_response(200);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BanWordsTest extends ShimmiePHPUnitTestCase {
|
class BanWordsTest extends ShimmiePHPUnitTestCase {
|
||||||
function check_blocked($image_id, $words) {
|
public function check_blocked($image_id, $words) {
|
||||||
global $user;
|
global $user;
|
||||||
try {
|
try {
|
||||||
send_event(new CommentPostingEvent($image_id, $user, $words));
|
send_event(new CommentPostingEvent($image_id, $user, $words));
|
||||||
@ -11,7 +11,7 @@ class BanWordsTest extends ShimmiePHPUnitTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testWordBan() {
|
public function testWordBan() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_string("banned_words", "viagra\nporn\n\n/http:.*\.cn\//");
|
$config->set_string("banned_words", "viagra\nporn\n\n/http:.*\.cn\//");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class BlocksTest extends ShimmiePHPUnitTestCase {
|
class BlocksTest extends ShimmiePHPUnitTestCase {
|
||||||
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");
|
||||||
$this->assert_response(200);
|
$this->assert_response(200);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
class BlotterTest extends ShimmiePHPUnitTestCase {
|
class BlotterTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
|||||||
$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 ShimmiePHPUnitTestCase {
|
class BookmarksTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class BrowserSearchTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class BulkAddTest extends ShimmiePHPUnitTestCase {
|
||||||
function testBulkAdd() {
|
public function testBulkAdd() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$this->get_page('admin');
|
$this->get_page('admin');
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
class CommentListTest extends ShimmiePHPUnitTestCase {
|
class CommentListTest extends ShimmiePHPUnitTestCase {
|
||||||
function setUp() {
|
public function setUp() {
|
||||||
global $config;
|
global $config;
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$config->set_int("comment_limit", 100);
|
$config->set_int("comment_limit", 100);
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function tearDown() {
|
public function tearDown() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_int("comment_limit", 10);
|
$config->set_int("comment_limit", 10);
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCommentsPage() {
|
public function testCommentsPage() {
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
@ -85,7 +85,7 @@ class CommentListTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_no_text('ASDFASDF');
|
$this->assert_no_text('ASDFASDF');
|
||||||
}
|
}
|
||||||
|
|
||||||
function testSingleDel() {
|
public function testSingleDel() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class DanbooruApiTest extends ShimmiePHPUnitTestCase {
|
class DanbooruApiTest extends ShimmiePHPUnitTestCase {
|
||||||
function testSearch() {
|
public function testSearch() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
|
||||||
$image_id = $this->post_image("tests/bedroom_workshop.jpg", "data");
|
$image_id = $this->post_image("tests/bedroom_workshop.jpg", "data");
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
class DowntimeTest extends ShimmiePHPUnitTestCase {
|
class DowntimeTest extends ShimmiePHPUnitTestCase {
|
||||||
function tearDown() {
|
public function tearDown() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_bool("downtime", false);
|
$config->set_bool("downtime", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDowntime() {
|
public function testDowntime() {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$config->set_string("downtime_message", "brb, unit testing");
|
$config->set_string("downtime_message", "brb, unit testing");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class EmoticonTest extends ShimmiePHPUnitTestCase {
|
class EmoticonTest extends ShimmiePHPUnitTestCase {
|
||||||
function testEmoticons() {
|
public function testEmoticons() {
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ETTest extends ShimmiePHPUnitTestCase {
|
class ETTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class ExtManagerTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class FavoritesTest extends ShimmiePHPUnitTestCase {
|
||||||
function testFavorites() {
|
public function testFavorites() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class FeaturedTest extends ShimmiePHPUnitTestCase {
|
class FeaturedTest extends ShimmiePHPUnitTestCase {
|
||||||
function testFeatured() {
|
public function testFeatured() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class Handle404Test extends ShimmiePHPUnitTestCase {
|
class Handle404Test extends ShimmiePHPUnitTestCase {
|
||||||
function test404Handler() {
|
public function test404Handler() {
|
||||||
$this->get_page('not/a/page');
|
$this->get_page('not/a/page');
|
||||||
// most descriptive error first
|
// most descriptive error first
|
||||||
$this->assert_text("No handler could be found for the page 'not/a/page'");
|
$this->assert_text("No handler could be found for the page 'not/a/page'");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class IcoHandlerTest extends ShimmiePHPUnitTestCase {
|
class IcoHandlerTest extends ShimmiePHPUnitTestCase {
|
||||||
function testIcoHander() {
|
public function testIcoHander() {
|
||||||
$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->get_page("post/view/$image_id"); // test for no crash
|
$this->get_page("post/view/$image_id"); // test for no crash
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class PixelHandlerTest extends ShimmiePHPUnitTestCase {
|
class PixelHandlerTest extends ShimmiePHPUnitTestCase {
|
||||||
function testPixelHander() {
|
public function testPixelHander() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||||
//$this->assert_response(302);
|
//$this->assert_response(302);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class SVGHandlerTest extends ShimmiePHPUnitTestCase {
|
class SVGHandlerTest extends ShimmiePHPUnitTestCase {
|
||||||
function testSVGHander() {
|
public function testSVGHander() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/test.svg", "something");
|
$image_id = $this->post_image("tests/test.svg", "something");
|
||||||
$this->get_page("post/view/$image_id"); // test for no crash
|
$this->get_page("post/view/$image_id"); // test for no crash
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class HomeTest extends ShimmiePHPUnitTestCase {
|
class HomeTest extends ShimmiePHPUnitTestCase {
|
||||||
function testHomePage() {
|
public function testHomePage() {
|
||||||
$this->get_page('home');
|
$this->get_page('home');
|
||||||
|
|
||||||
// FIXME: this page doesn't use blocks; need assert_data_contains
|
// FIXME: this page doesn't use blocks; need assert_data_contains
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class HashBanTest extends ShimmiePHPUnitTestCase {
|
class HashBanTest extends ShimmiePHPUnitTestCase {
|
||||||
function testBan() {
|
public function testBan() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class IndexTest extends ShimmiePHPUnitTestCase {
|
class IndexTest extends ShimmiePHPUnitTestCase {
|
||||||
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");
|
||||||
@ -29,7 +29,7 @@ class IndexTest extends ShimmiePHPUnitTestCase {
|
|||||||
# 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("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||||
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "computer bedroom workshop");
|
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "computer bedroom workshop");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class IPBanTest extends ShimmiePHPUnitTestCase {
|
class IPBanTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class LinkImageTest extends ShimmiePHPUnitTestCase {
|
||||||
function testLinkImage() {
|
public function testLinkImage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pie");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pie");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class LogDatabaseTest extends ShimmiePHPUnitTestCase {
|
class LogDatabaseTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class NumericScoreTest extends ShimmiePHPUnitTestCase {
|
||||||
function testNumericScore() {
|
public function testNumericScore() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/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 ShimmiePHPUnitTestCase {
|
class OekakiTest extends ShimmiePHPUnitTestCase {
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class PrivMsgTest extends ShimmiePHPUnitTestCase {
|
class PrivMsgTest extends ShimmiePHPUnitTestCase {
|
||||||
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");
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ class PrivMsgTest extends ShimmiePHPUnitTestCase {
|
|||||||
$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");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class PoolsTest extends ShimmiePHPUnitTestCase {
|
class PoolsTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class RandomTest extends ShimmiePHPUnitTestCase {
|
||||||
function testRandom() {
|
public function testRandom() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
@ -15,7 +15,7 @@ class RandomTest extends ShimmiePHPUnitTestCase {
|
|||||||
# FIXME: assert($raw == file(blah.jpg))
|
# FIXME: assert($raw == file(blah.jpg))
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPostListBlock() {
|
public function testPostListBlock() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page("setup");
|
$this->get_page("setup");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class RatingTest extends ShimmiePHPUnitTestCase {
|
class RatingTest extends ShimmiePHPUnitTestCase {
|
||||||
function testRating() {
|
public function testRating() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class RegenThumbTest extends ShimmiePHPUnitTestCase {
|
class RegenThumbTest extends ShimmiePHPUnitTestCase {
|
||||||
function testRegenThumb() {
|
public function testRegenThumb() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$image_id = $this->post_image("tests/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 ShimmiePHPUnitTestCase {
|
class ReportImageTest extends ShimmiePHPUnitTestCase {
|
||||||
function testReportImage() {
|
public function testReportImage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$image_id = $this->post_image("tests/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 ShimmiePHPUnitTestCase {
|
class ResLimitTest extends ShimmiePHPUnitTestCase {
|
||||||
function testResLimitOK() {
|
public function testResLimitOK() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_int("upload_min_height", 0);
|
$config->set_int("upload_min_height", 0);
|
||||||
$config->set_int("upload_min_width", 0);
|
$config->set_int("upload_min_width", 0);
|
||||||
@ -16,7 +16,7 @@ class ResLimitTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_no_text("ratio");
|
$this->assert_no_text("ratio");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testResLimitSmall() {
|
public function testResLimitSmall() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_int("upload_min_height", 900);
|
$config->set_int("upload_min_height", 900);
|
||||||
$config->set_int("upload_min_width", 900);
|
$config->set_int("upload_min_width", 900);
|
||||||
@ -33,7 +33,7 @@ class ResLimitTest extends ShimmiePHPUnitTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testResLimitLarge() {
|
public function testResLimitLarge() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_int("upload_min_height", 0);
|
$config->set_int("upload_min_height", 0);
|
||||||
$config->set_int("upload_min_width", 0);
|
$config->set_int("upload_min_width", 0);
|
||||||
@ -50,7 +50,7 @@ class ResLimitTest extends ShimmiePHPUnitTestCase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testResLimitRatio() {
|
public function testResLimitRatio() {
|
||||||
global $config;
|
global $config;
|
||||||
$config->set_int("upload_min_height", -1);
|
$config->set_int("upload_min_height", -1);
|
||||||
$config->set_int("upload_min_width", -1);
|
$config->set_int("upload_min_width", -1);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class SetupTest extends ShimmiePHPUnitTestCase {
|
class SetupTest extends ShimmiePHPUnitTestCase {
|
||||||
function testNiceUrlsTest() {
|
public function testNiceUrlsTest() {
|
||||||
# XXX: this only checks that the text is "ok", to check
|
# XXX: this only checks that the text is "ok", to check
|
||||||
# for a bug where it was coming out as "\nok"; it doesn't
|
# for a bug where it was coming out as "\nok"; it doesn't
|
||||||
# check that niceurls actually work
|
# check that niceurls actually work
|
||||||
@ -9,27 +9,27 @@ class SetupTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_no_content("\n");
|
$this->assert_no_content("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAuthAnon() {
|
public function testAuthAnon() {
|
||||||
$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");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAuthUser() {
|
public function testAuthUser() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$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");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAuthAdmin() {
|
public function testAuthAdmin() {
|
||||||
$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");
|
||||||
$this->assert_text("General");
|
$this->assert_text("General");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAdvanced() {
|
public function testAdvanced() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$this->get_page('setup/advanced');
|
$this->get_page('setup/advanced');
|
||||||
$this->assert_title("Shimmie Setup");
|
$this->assert_title("Shimmie Setup");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class ShimmieApiTest extends ShimmiePHPUnitTestCase {
|
class ShimmieApiTest extends ShimmiePHPUnitTestCase {
|
||||||
function testAPI() {
|
public function testAPI() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class SiteDescriptionTest extends ShimmiePHPUnitTestCase {
|
class SiteDescriptionTest extends ShimmiePHPUnitTestCase {
|
||||||
function testSiteDescription() {
|
public function testSiteDescription() {
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
$config->set_string("site_description", "A Shimmie testbed");
|
$config->set_string("site_description", "A Shimmie testbed");
|
||||||
$this->get_page("post/list");
|
$this->get_page("post/list");
|
||||||
@ -10,7 +10,7 @@ class SiteDescriptionTest extends ShimmiePHPUnitTestCase {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testSiteKeywords() {
|
public function testSiteKeywords() {
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
$config->set_string("site_keywords", "foo,bar,baz");
|
$config->set_string("site_keywords", "foo,bar,baz");
|
||||||
$this->get_page("post/list");
|
$this->get_page("post/list");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class XMLSitemapTest extends ShimmiePHPUnitTestCase {
|
class XMLSitemapTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
class TagEditTest extends ShimmiePHPUnitTestCase {
|
||||||
function testTagEdit() {
|
public function testTagEdit() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||||
$this->get_page("post/view/$image_id");
|
$this->get_page("post/view/$image_id");
|
||||||
@ -21,7 +21,7 @@ class TagEditTest extends ShimmiePHPUnitTestCase {
|
|||||||
$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("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||||
$this->get_page("post/view/$image_id");
|
$this->get_page("post/view/$image_id");
|
||||||
@ -51,7 +51,7 @@ class TagEditTest extends ShimmiePHPUnitTestCase {
|
|||||||
/*
|
/*
|
||||||
* 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->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class TagHistoryTest extends ShimmiePHPUnitTestCase {
|
class TagHistoryTest extends ShimmiePHPUnitTestCase {
|
||||||
function testTagHistory() {
|
public function testTagHistory() {
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
$image_id = $this->post_image("tests/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 ShimmiePHPUnitTestCase {
|
class TagListTest extends ShimmiePHPUnitTestCase {
|
||||||
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 ShimmiePHPUnitTestCase {
|
|||||||
# 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 ShimmiePHPUnitTestCase {
|
class TipsTest extends ShimmiePHPUnitTestCase {
|
||||||
function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
@ -15,7 +15,7 @@ class TipsTest extends ShimmiePHPUnitTestCase {
|
|||||||
$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");
|
||||||
@ -37,7 +37,7 @@ class TipsTest extends ShimmiePHPUnitTestCase {
|
|||||||
$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");
|
||||||
@ -59,7 +59,7 @@ class TipsTest extends ShimmiePHPUnitTestCase {
|
|||||||
$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,18 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
class UploadTest extends ShimmiePHPUnitTestCase {
|
class UploadTest extends ShimmiePHPUnitTestCase {
|
||||||
function testUploadPage() {
|
public function testUploadPage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
|
|
||||||
$this->get_page("upload");
|
$this->get_page("upload");
|
||||||
$this->assert_title("Upload");
|
$this->assert_title("Upload");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testUpload() {
|
public function testUpload() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRejectDupe() {
|
public function testRejectDupe() {
|
||||||
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -23,7 +23,7 @@ class UploadTest extends ShimmiePHPUnitTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRejectUnknownFiletype() {
|
public function testRejectUnknownFiletype() {
|
||||||
try {
|
try {
|
||||||
$this->post_image("index.php", "test");
|
$this->post_image("index.php", "test");
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ class UploadTest extends ShimmiePHPUnitTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRejectHuge() {
|
public function testRejectHuge() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
// FIXME: huge.dat is rejected for other reasons; manual testing shows that this works
|
// FIXME: huge.dat is rejected for other reasons; manual testing shows that this works
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class UserPageTest extends ShimmiePHPUnitTestCase {
|
class UserPageTest extends ShimmiePHPUnitTestCase {
|
||||||
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,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
class ViewTest extends ShimmiePHPUnitTestCase {
|
class ViewTest extends ShimmiePHPUnitTestCase {
|
||||||
function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
// FIXME: upload images
|
// FIXME: upload images
|
||||||
}
|
}
|
||||||
|
|
||||||
function testViewPage() {
|
public function testViewPage() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||||
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
||||||
@ -16,7 +16,7 @@ class ViewTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_title("Image $image_id_1: test");
|
$this->assert_title("Image $image_id_1: test");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPrevNext() {
|
public function testPrevNext() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
class WikiTest extends ShimmiePHPUnitTestCase {
|
class WikiTest extends ShimmiePHPUnitTestCase {
|
||||||
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() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
@ -40,7 +40,7 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testLock() {
|
public function testLock() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
@ -76,7 +76,7 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDefault() {
|
public function testDefault() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
@ -95,7 +95,7 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->log_out();
|
$this->log_out();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRevisions() {
|
public function testRevisions() {
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
$this->log_in_as_admin();
|
$this->log_in_as_admin();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
class WordFilterTest extends ShimmiePHPUnitTestCase {
|
class WordFilterTest extends ShimmiePHPUnitTestCase {
|
||||||
function setUp() {
|
public function setUp() {
|
||||||
global $config;
|
global $config;
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$config->set_string("word_filter", "whore,nice lady\na duck,a kitten\n white ,\tspace\ninvalid");
|
$config->set_string("word_filter", "whore,nice lady\na duck,a kitten\n white ,\tspace\ninvalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
function _doThings($in, $out) {
|
public function _doThings($in, $out) {
|
||||||
global $user;
|
global $user;
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
||||||
@ -15,49 +15,49 @@ class WordFilterTest extends ShimmiePHPUnitTestCase {
|
|||||||
$this->assert_text($out);
|
$this->assert_text($out);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRegular() {
|
public function testRegular() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"posted by a whore",
|
"posted by a whore",
|
||||||
"posted by a nice lady"
|
"posted by a nice lady"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testReplaceAll() {
|
public function testReplaceAll() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"a whore is a whore is a whore",
|
"a whore is a whore is a whore",
|
||||||
"a nice lady is a nice lady is a nice lady"
|
"a nice lady is a nice lady is a nice lady"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testMixedCase() {
|
public function testMixedCase() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"monkey WhorE",
|
"monkey WhorE",
|
||||||
"monkey nice lady"
|
"monkey nice lady"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testOnlyWholeWords() {
|
public function testOnlyWholeWords() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"my name is whoretta",
|
"my name is whoretta",
|
||||||
"my name is whoretta"
|
"my name is whoretta"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testMultipleWords() {
|
public function testMultipleWords() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"I would like a duck",
|
"I would like a duck",
|
||||||
"I would like a kitten"
|
"I would like a kitten"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testWhitespace() {
|
public function testWhitespace() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"A colour is white",
|
"A colour is white",
|
||||||
"A colour is space"
|
"A colour is space"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testIgnoreInvalid() {
|
public function testIgnoreInvalid() {
|
||||||
$this->_doThings(
|
$this->_doThings(
|
||||||
"The word was invalid",
|
"The word was invalid",
|
||||||
"The word was invalid"
|
"The word was invalid"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user