MINOR Tweaked ErrorPageTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@75114 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-04-25 05:13:17 +00:00 committed by Sam Minnee
parent dd97216484
commit 2b30a71ae3

View File

@ -8,16 +8,12 @@ class ErrorPageTest extends FunctionalTest {
static $fixture_file = 'sapphire/tests/ErrorPageTest.yml';
function test404ErrorPage() {
$errorPage = $this->objFromFixture('ErrorPage', '404');
$page = $this->objFromFixture('ErrorPage', '404');
/* We have an ErrorPage object to use */
$this->assertTrue($errorPage instanceof ErrorPage);
/* The page is an instance of ErrorPage */
$this->assertTrue($page instanceof ErrorPage, 'The page is an instance of ErrorPage');
/* Test the URL of the error page out to get a response */
$response = $this->get($errorPage->URLSegment);
/* We have an HTTPResponse object for the error page */
$this->assertTrue($response instanceof HTTPResponse);
$response = $this->get($page->URLSegment);
/* We have body text from the error page */
$this->assertNotNull($response->getBody(), 'We have body text from the error page');