skip tests for extensions who don't support the current db

This commit is contained in:
Shish 2015-09-21 10:05:32 +01:00
parent 98d71f527d
commit c337abe280
13 changed files with 24 additions and 17 deletions

View file

@ -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");

View file

@ -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");

View file

@ -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();

View file

@ -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');

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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();