skip tests for extensions who don't support the current db
This commit is contained in:
parent
98d71f527d
commit
c337abe280
13 changed files with 24 additions and 17 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
Reference in a new issue