consistent naming for test functions

This commit is contained in:
Shish
2009-08-19 01:28:48 +01:00
parent 62afcfe38c
commit 1946e3c943
40 changed files with 325 additions and 325 deletions

View File

@ -4,26 +4,26 @@ class NumericScoreTest extends ShimmieWebTestCase {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx");
$this->get_page("post/view/$image_id");
$this->assertText("Current Score: 0");
$this->assert_text("Current Score: 0");
$this->click("Vote Down");
$this->assertText("Current Score: -1");
$this->assert_text("Current Score: -1");
$this->click("Vote Up");
$this->assertText("Current Score: 1");
$this->assert_text("Current Score: 1");
# FIXME: "remove vote" button?
# FIXME: test that up and down are hidden if already voted up or down
# test search by score
$this->get_page("post/list/score=1/1");
$this->assertTitle("Image $image_id: pbx");
$this->assert_title("Image $image_id: pbx");
# test search by vote
$this->get_page("post/list/upvoted_by=test/1");
$this->assertTitle("Image $image_id: pbx");
$this->assertNoText("No Images Found");
$this->assert_title("Image $image_id: pbx");
$this->assert_no_text("No Images Found");
# and downvote
$this->get_page("post/list/downvoted_by=test/1");
$this->assertText("No Images Found");
$this->assert_text("No Images Found");
$this->log_out();
$this->log_in_as_admin();