fembooru/ext/pools/test.php

44 lines
1.1 KiB
PHP
Raw Normal View History

2020-01-26 13:19:35 +00:00
<?php declare(strict_types=1);
class PoolsTest extends ShimmiePHPUnitTestCase
{
public function testPools()
{
$this->get_page('pool/list');
$this->assert_title("Pools");
2009-11-15 06:23:42 +00:00
$this->get_page('pool/new');
$this->assert_title("Error");
2009-11-15 06:23:42 +00:00
$this->log_in_as_user();
$this->get_page('pool/list');
2015-09-20 22:40:04 +01:00
$this->markTestIncomplete();
2015-09-20 22:40:04 +01:00
$this->click("Create Pool");
$this->assert_title("Create Pool");
$this->click("Create");
$this->assert_title("Error");
2009-11-15 06:23:42 +00:00
$this->get_page('pool/new');
$this->assert_title("Create Pool");
$this->set_field("title", "Test Pool Title");
$this->set_field("description", "Test pool description");
$this->click("Create");
$this->assert_title("Pool: Test Pool Title");
2009-11-15 06:23:42 +00:00
$this->log_out();
2009-11-15 06:23:42 +00:00
$this->log_in_as_admin();
2009-11-15 06:23:42 +00:00
$this->get_page('pool/list');
$this->click("Test Pool Title");
$this->assert_title("Pool: Test Pool Title");
$this->click("Delete Pool");
$this->assert_title("Pools");
$this->assert_no_text("Test Pool Title");
2009-11-15 06:23:42 +00:00
$this->log_out();
}
2009-11-15 05:34:30 +00:00
}