mark tests as incomplete rather than commenting them out
This commit is contained in:
parent
c337abe280
commit
c54e336695
10 changed files with 61 additions and 26 deletions
|
@ -26,6 +26,8 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase {
|
|||
* dig into this and determine exactly what is happening.
|
||||
*
|
||||
*********************************************************************
|
||||
*/
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_admin();
|
||||
|
||||
|
@ -97,8 +99,6 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase {
|
|||
$this->get_page('alias/list');
|
||||
$this->assert_title("Alias List");
|
||||
$this->assert_no_text("Add");
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@ class BulkAddTest extends ShimmiePHPUnitTestCase {
|
|||
$this->assertContains("Error, asdf is not a readable directory",
|
||||
$bae->results, implode("\n", $bae->results));
|
||||
|
||||
return; // FIXME: have BAE return a list of successes as well as errors?
|
||||
// FIXME: have BAE return a list of successes as well as errors?
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->get_page('admin');
|
||||
$this->assert_title("Admin Tools");
|
||||
|
|
|
@ -85,8 +85,9 @@ class CommentListTest extends ShimmiePHPUnitTestCase {
|
|||
$this->assert_no_text('ASDFASDF');
|
||||
}
|
||||
|
||||
/*
|
||||
function testSingleDel() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_admin();
|
||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||
|
||||
|
@ -106,5 +107,4 @@ class CommentListTest extends ShimmiePHPUnitTestCase {
|
|||
$this->delete_image($image_id);
|
||||
$this->log_out();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ class IPBanTest extends ShimmiePHPUnitTestCase {
|
|||
|
||||
$this->get_page('ip_ban/list');
|
||||
$this->assert_no_text("42.42.42.42");
|
||||
/*
|
||||
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->set_field('ip', '42.42.42.42');
|
||||
$this->set_field('reason', 'unit testing');
|
||||
$this->set_field('end', '1 week');
|
||||
|
@ -18,7 +20,6 @@ class IPBanTest extends ShimmiePHPUnitTestCase {
|
|||
$this->assert_text("42.42.42.42");
|
||||
$this->click("Remove"); // FIXME: remove which ban? :S
|
||||
$this->assert_no_text("42.42.42.42");
|
||||
*/
|
||||
|
||||
$this->get_page('ip_ban/list?all=on'); // just test it doesn't crash for now
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ class LinkImageTest extends ShimmiePHPUnitTestCase {
|
|||
# in there, see if it takes us to the right page
|
||||
$this->get_page("post/view/$image_id");
|
||||
|
||||
/*
|
||||
$this->markTestIncomplete();
|
||||
|
||||
// FIXME
|
||||
$matches = array();
|
||||
preg_match("#value='(http://.*(/|%2F)post(/|%2F)view(/|%2F)[0-9]+)'#", $raw, $matches);
|
||||
|
@ -18,7 +19,6 @@ class LinkImageTest extends ShimmiePHPUnitTestCase {
|
|||
$this->get($matches[1]);
|
||||
$this->assert_title("Image $image_id: pie");
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,10 +48,12 @@ class TagEditTest extends ShimmiePHPUnitTestCase {
|
|||
$this->log_out();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_admin();
|
||||
|
||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
|
||||
|
@ -71,6 +73,5 @@ class TagEditTest extends ShimmiePHPUnitTestCase {
|
|||
|
||||
$this->log_out();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ class TagHistoryTest extends ShimmiePHPUnitTestCase {
|
|||
$this->get_page("post/view/$image_id");
|
||||
$this->assert_title("Image $image_id: pbx");
|
||||
|
||||
/*
|
||||
$this->markTestIncomplete();
|
||||
|
||||
// FIXME
|
||||
$this->set_field("tag_edit__tags", "new");
|
||||
$this->click("Set");
|
||||
|
@ -15,7 +16,6 @@ class TagHistoryTest extends ShimmiePHPUnitTestCase {
|
|||
$this->assert_text("new (Set by demo");
|
||||
$this->click("Revert To");
|
||||
$this->assert_title("Image $image_id: pbx");
|
||||
*/
|
||||
|
||||
$this->get_page("tag_history/all/1");
|
||||
$this->assert_title("Global Tag History");
|
||||
|
|
|
@ -33,15 +33,15 @@ class UploadTest extends ShimmiePHPUnitTestCase {
|
|||
}
|
||||
|
||||
function testRejectHuge() {
|
||||
/*
|
||||
$this->markTestIncomplete();
|
||||
|
||||
// FIXME: huge.dat is rejected for other reasons; manual testing shows that this works
|
||||
file_put_contents("huge.dat", file_get_contents("tests/pbx_screenshot.jpg") . str_repeat("U", 1024*1024*3));
|
||||
$image_id_4 = $this->post_image("index.php", "test");
|
||||
$this->post_image("index.php", "test");
|
||||
$this->assert_response(200);
|
||||
$this->assert_title("Upload Status");
|
||||
$this->assert_text("File too large");
|
||||
unlink("huge.dat");
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
class ViewTest extends ShimmiePHPUnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
// FIXME: upload images
|
||||
}
|
||||
|
||||
function testViewPage() {
|
||||
$this->log_in_as_user();
|
||||
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||
|
@ -9,8 +14,16 @@ class ViewTest extends ShimmiePHPUnitTestCase {
|
|||
|
||||
$this->get_page("post/view/$image_id_1");
|
||||
$this->assert_title("Image $image_id_1: test");
|
||||
}
|
||||
|
||||
function testPrevNext() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_user();
|
||||
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
||||
$image_id_3 = $this->post_image("tests/favicon.png", "test");
|
||||
|
||||
/*
|
||||
$this->click("Prev");
|
||||
$this->assert_title("Image $image_id_2: test2");
|
||||
|
||||
|
@ -19,22 +32,35 @@ class ViewTest extends ShimmiePHPUnitTestCase {
|
|||
|
||||
$this->click("Next");
|
||||
$this->assert_title("Image not found");
|
||||
*/
|
||||
}
|
||||
|
||||
public function testView404() {
|
||||
$this->log_in_as_user();
|
||||
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
||||
$image_id_3 = $this->post_image("tests/favicon.png", "test");
|
||||
$idp1 = $image_id_3 + 1;
|
||||
|
||||
$this->get_page("post/view/$idp1");
|
||||
$this->assert_title('Image not found');
|
||||
|
||||
$this->get_page('post/view/-1');
|
||||
$this->assert_title('Image not found');
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: this assumes Nice URLs.
|
||||
*
|
||||
public function testNextSearchResult() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_user();
|
||||
$image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||
$image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2");
|
||||
$image_id_3 = $this->post_image("tests/favicon.png", "test");
|
||||
|
||||
// FIXME: this assumes Nice URLs.
|
||||
# note: skips image #2
|
||||
$this->get_page("post/view/$image_id_1?search=test"); // FIXME: assumes niceurls
|
||||
$this->click("Prev");
|
||||
$this->assert_title("Image $image_id_3: test");
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||
$this->assert_text("This is a default page");
|
||||
}
|
||||
|
||||
/*
|
||||
function testAccess() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
global $config;
|
||||
foreach(array("anon", "user", "admin") as $user) {
|
||||
foreach(array(false, true) as $allowed) {
|
||||
|
@ -40,6 +41,8 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||
}
|
||||
|
||||
function testLock() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
global $config;
|
||||
$config->set_bool("wiki_edit_anon", true);
|
||||
$config->set_bool("wiki_edit_user", false);
|
||||
|
@ -74,6 +77,8 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||
}
|
||||
|
||||
function testDefault() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page("wiki/wiki:default");
|
||||
$this->assert_title("wiki:default");
|
||||
|
@ -91,6 +96,8 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||
}
|
||||
|
||||
function testRevisions() {
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page("wiki/test");
|
||||
$this->assert_title("test");
|
||||
|
@ -111,6 +118,5 @@ class WikiTest extends ShimmiePHPUnitTestCase {
|
|||
$this->click("Delete All");
|
||||
$this->log_out();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue