forked from Cavemanon/cavepaintings
PSR-2. I'm not a huge fan, but ugly consistency beats no consistency...
This commit is contained in:
@@ -1,85 +1,89 @@
|
||||
<?php
|
||||
class TipsTest extends ShimmiePHPUnitTestCase {
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
class TipsTest extends ShimmiePHPUnitTestCase
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page("tips/list");
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page("tips/list");
|
||||
|
||||
$this->markTestIncomplete();
|
||||
$this->markTestIncomplete();
|
||||
|
||||
// get rid of the default data if it's there
|
||||
if(strpos($raw, "Delete")) {
|
||||
$this->click("Delete");
|
||||
}
|
||||
$this->log_out();
|
||||
}
|
||||
// get rid of the default data if it's there
|
||||
if (strpos($raw, "Delete")) {
|
||||
$this->click("Delete");
|
||||
}
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
public function testImageless() {
|
||||
$this->log_in_as_admin();
|
||||
public function testImageless()
|
||||
{
|
||||
$this->log_in_as_admin();
|
||||
|
||||
$this->get_page("tips/list");
|
||||
$this->assert_title("Tips List");
|
||||
$this->get_page("tips/list");
|
||||
$this->assert_title("Tips List");
|
||||
|
||||
$this->markTestIncomplete();
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->set_field("image", "");
|
||||
$this->set_field("text", "an imageless tip");
|
||||
$this->click("Submit");
|
||||
$this->assert_title("Tips List");
|
||||
$this->set_field("image", "");
|
||||
$this->set_field("text", "an imageless tip");
|
||||
$this->click("Submit");
|
||||
$this->assert_title("Tips List");
|
||||
|
||||
$this->get_page("post/list");
|
||||
$this->assert_text("an imageless tip");
|
||||
$this->get_page("post/list");
|
||||
$this->assert_text("an imageless tip");
|
||||
|
||||
$this->get_page("tips/list");
|
||||
$this->click("Delete");
|
||||
$this->get_page("tips/list");
|
||||
$this->click("Delete");
|
||||
|
||||
$this->log_out();
|
||||
}
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
public function testImaged() {
|
||||
$this->log_in_as_admin();
|
||||
public function testImaged()
|
||||
{
|
||||
$this->log_in_as_admin();
|
||||
|
||||
$this->get_page("tips/list");
|
||||
$this->assert_title("Tips List");
|
||||
$this->get_page("tips/list");
|
||||
$this->assert_title("Tips List");
|
||||
|
||||
$this->markTestIncomplete();
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->set_field("image", "coins.png");
|
||||
$this->set_field("text", "an imaged tip");
|
||||
$this->click("Submit");
|
||||
$this->assert_title("Tips List");
|
||||
$this->set_field("image", "coins.png");
|
||||
$this->set_field("text", "an imaged tip");
|
||||
$this->click("Submit");
|
||||
$this->assert_title("Tips List");
|
||||
|
||||
$this->get_page("post/list");
|
||||
$this->assert_text("an imaged tip");
|
||||
$this->get_page("post/list");
|
||||
$this->assert_text("an imaged tip");
|
||||
|
||||
$this->get_page("tips/list");
|
||||
$this->click("Delete");
|
||||
$this->get_page("tips/list");
|
||||
$this->click("Delete");
|
||||
|
||||
$this->log_out();
|
||||
}
|
||||
$this->log_out();
|
||||
}
|
||||
|
||||
public function testDisabled() {
|
||||
$this->log_in_as_admin();
|
||||
public function testDisabled()
|
||||
{
|
||||
$this->log_in_as_admin();
|
||||
|
||||
$this->get_page("tips/list");
|
||||
$this->assert_title("Tips List");
|
||||
$this->get_page("tips/list");
|
||||
$this->assert_title("Tips List");
|
||||
|
||||
$this->markTestIncomplete();
|
||||
$this->markTestIncomplete();
|
||||
|
||||
$this->set_field("image", "coins.png");
|
||||
$this->set_field("text", "an imaged tip");
|
||||
$this->click("Submit");
|
||||
$this->click("Yes");
|
||||
$this->assert_title("Tips List");
|
||||
$this->set_field("image", "coins.png");
|
||||
$this->set_field("text", "an imaged tip");
|
||||
$this->click("Submit");
|
||||
$this->click("Yes");
|
||||
$this->assert_title("Tips List");
|
||||
|
||||
$this->get_page("post/list");
|
||||
$this->assert_no_text("an imaged tip");
|
||||
$this->get_page("post/list");
|
||||
$this->assert_no_text("an imaged tip");
|
||||
|
||||
$this->get_page("tips/list");
|
||||
$this->click("Delete");
|
||||
$this->get_page("tips/list");
|
||||
$this->click("Delete");
|
||||
|
||||
$this->log_out();
|
||||
}
|
||||
$this->log_out();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user