diff --git a/ext/favorites/test.php b/ext/favorites/test.php index 6d06d1c0..bd172711 100644 --- a/ext/favorites/test.php +++ b/ext/favorites/test.php @@ -8,7 +8,8 @@ class FavoritesTest extends ShimmiePHPUnitTestCase { $this->assert_title("Image $image_id: test"); $this->assert_no_text("Favorited By"); - return; // FIXME + $this->markTestIncomplete(); + $this->click("Favorite"); $this->assert_text("Favorited By"); diff --git a/ext/featured/test.php b/ext/featured/test.php index 16ad8deb..4d93a5ba 100644 --- a/ext/featured/test.php +++ b/ext/featured/test.php @@ -10,7 +10,8 @@ class FeaturedTest extends ShimmiePHPUnitTestCase { $this->get_page("post/view/$image_id"); $this->assert_title("Image $image_id: pbx"); - return; // FIXME + $this->markTestIncomplete(); + $this->click("Feature This"); $this->get_page("post/list"); $this->assert_text("Featured Image"); diff --git a/ext/image_hash_ban/test.php b/ext/image_hash_ban/test.php index f22bdf8c..56c5dfc0 100644 --- a/ext/image_hash_ban/test.php +++ b/ext/image_hash_ban/test.php @@ -8,7 +8,7 @@ class HashBanTest extends ShimmiePHPUnitTestCase { $this->log_in_as_admin(); $this->get_page("post/view/$image_id"); - return; // FIXME + $this->markTestIncomplete(); $this->click("Ban and Delete"); $this->log_out(); diff --git a/ext/index/test.php b/ext/index/test.php index 677850b4..c6a196f9 100644 --- a/ext/index/test.php +++ b/ext/index/test.php @@ -63,7 +63,7 @@ class IndexTest extends ShimmiePHPUnitTestCase { //$this->assert_title(new PatternExpectation("/^Image $image_id_1: /")); $this->assert_no_text("No Images Found"); - return; // FIXME + $this->markTestIncomplete(); # multiple tags, many results $this->get_page('post/list/computer%20size=640x480/1'); diff --git a/ext/numeric_score/test.php b/ext/numeric_score/test.php index cb6ba491..f2a9807b 100644 --- a/ext/numeric_score/test.php +++ b/ext/numeric_score/test.php @@ -5,7 +5,7 @@ class NumericScoreTest extends ShimmiePHPUnitTestCase { $image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx"); $this->get_page("post/view/$image_id"); - return; // FIXME + $this->markTestIncomplete(); $this->assert_text("Current Score: 0"); $this->click("Vote Down"); diff --git a/ext/pm/test.php b/ext/pm/test.php index 583e7574..20aab33b 100644 --- a/ext/pm/test.php +++ b/ext/pm/test.php @@ -4,7 +4,7 @@ class PrivMsgTest extends ShimmiePHPUnitTestCase { $this->log_in_as_admin(); $this->get_page("user/test"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field('subject', "message demo to test"); $this->set_field('message', "message contents"); @@ -35,7 +35,7 @@ class PrivMsgTest extends ShimmiePHPUnitTestCase { $this->log_in_as_admin(); $this->get_page("user/test"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field('subject', "message demo to test"); $this->set_field('message', "message contents"); diff --git a/ext/pools/test.php b/ext/pools/test.php index 475583dc..81e9d63c 100644 --- a/ext/pools/test.php +++ b/ext/pools/test.php @@ -10,7 +10,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase { $this->log_in_as_user(); $this->get_page('pool/list'); - return; // FIXME + $this->markTestIncomplete(); $this->click("Create Pool"); $this->assert_title("Create Pool"); diff --git a/ext/random_image/test.php b/ext/random_image/test.php index 6cf52603..0af4e906 100644 --- a/ext/random_image/test.php +++ b/ext/random_image/test.php @@ -19,7 +19,7 @@ class RandomTest extends ShimmiePHPUnitTestCase { $this->log_in_as_admin(); $this->get_page("setup"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("_config_show_random_block", true); $this->click("Save Settings"); diff --git a/ext/rating/test.php b/ext/rating/test.php index 41fa153e..6a0ac913 100644 --- a/ext/rating/test.php +++ b/ext/rating/test.php @@ -9,7 +9,7 @@ class RatingTest extends ShimmiePHPUnitTestCase { $this->get_page("post/view/$image_id"); $this->assert_title("Image $image_id: pbx"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("tag_edit__tags", "new"); $this->click("Set"); diff --git a/ext/report_image/test.php b/ext/report_image/test.php index 12eacb02..8edbf66f 100644 --- a/ext/report_image/test.php +++ b/ext/report_image/test.php @@ -5,7 +5,7 @@ class ReportImageTest extends ShimmiePHPUnitTestCase { $image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot"); $this->get_page("post/view/$image_id"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field('reason', "report details"); $this->click("Report"); diff --git a/ext/tag_edit/test.php b/ext/tag_edit/test.php index dd3f88f7..fcc2ff09 100644 --- a/ext/tag_edit/test.php +++ b/ext/tag_edit/test.php @@ -6,7 +6,7 @@ class TagEditTest extends ShimmiePHPUnitTestCase { $this->get_page("post/view/$image_id"); $this->assert_title("Image $image_id: pbx"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("tag_edit__tags", "new"); $this->click("Set"); @@ -27,7 +27,7 @@ class TagEditTest extends ShimmiePHPUnitTestCase { $this->get_page("post/view/$image_id"); $this->assert_title("Image $image_id: pbx"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("tag_edit__source", "example.com"); $this->click("Set"); diff --git a/ext/tips/test.php b/ext/tips/test.php index 6ef706b2..bc5015a9 100644 --- a/ext/tips/test.php +++ b/ext/tips/test.php @@ -6,7 +6,7 @@ class TipsTest extends ShimmiePHPUnitTestCase { $this->log_in_as_admin(); $this->get_page("tips/list"); - return; // FIXME + $this->markTestIncomplete(); // get rid of the default data if it's there if(strpos($raw, "Delete")) { @@ -21,7 +21,7 @@ class TipsTest extends ShimmiePHPUnitTestCase { $this->get_page("tips/list"); $this->assert_title("Tips List"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("image", ""); $this->set_field("text", "an imageless tip"); @@ -43,7 +43,7 @@ class TipsTest extends ShimmiePHPUnitTestCase { $this->get_page("tips/list"); $this->assert_title("Tips List"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("image", "coins.png"); $this->set_field("text", "an imaged tip"); @@ -65,7 +65,7 @@ class TipsTest extends ShimmiePHPUnitTestCase { $this->get_page("tips/list"); $this->assert_title("Tips List"); - return; // FIXME + $this->markTestIncomplete(); $this->set_field("image", "coins.png"); $this->set_field("text", "an imaged tip"); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6902f67a..5b6b9827 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -21,6 +21,11 @@ abstract class ShimmiePHPUnitTestCase extends PHPUnit_Framework_TestCase { private $images = array(); public function setUp() { + $class = str_replace("Test", "", get_class($this)); + if(!method_exists($class, "is_live") || !ext_is_live($class)) { + $this->markTestSkipped("$class not supported with this database"); + } + // things to do after bootstrap and before request // log in as anon $this->log_out();