2008-10-11 07:09:42 +00:00
|
|
|
<?php
|
|
|
|
class IndexTest extends WebTestCase {
|
|
|
|
function testIndexPage() {
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("Shimmie Testbed");
|
|
|
|
$this->assertText("Prev | Index | Next");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/-1');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("Shimmie Testbed");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/0');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("Shimmie Testbed");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/1');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("Shimmie Testbed");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/99999');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("Shimmie Testbed");
|
|
|
|
}
|
|
|
|
|
|
|
|
function testSearches() {
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/maumaumau/1');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("maumaumau");
|
|
|
|
$this->assertText("No Images Found");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/screenshot/1');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("screenshot");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/size=1024x768/1');
|
2008-10-18 06:03:26 +00:00
|
|
|
$this->assertTitle("size=1024x768");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/screenshot%20size=1024x768/1');
|
2008-10-18 06:03:26 +00:00
|
|
|
$this->assertTitle("screenshot size=1024x768");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/screenshot%20computer/1');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("screenshot computer");
|
|
|
|
|
2008-10-18 10:34:15 +00:00
|
|
|
$this->get(TEST_BASE.'/post/list/screenshot%20computer%20-pbx/1');
|
2008-10-11 07:09:42 +00:00
|
|
|
$this->assertTitle("screenshot computer -pbx");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|