mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX: Changes needed to respond to whitespace changes.
I’ve made the ContentControllerTest whitespace agnostic, as it’s possible that we change the whitespace semantics of includes in SS4 and I don’t want to make this test brittle to that.
This commit is contained in:
parent
bbc3aaaf9f
commit
bf6337c59a
@ -149,7 +149,7 @@ class ContentControllerTest extends FunctionalTest {
|
||||
$page->publish("Stage", "Live");
|
||||
|
||||
$response = $self->get($page->RelativeLink());
|
||||
$self->assertEquals("ContentControllerTestPageWithoutController", $response->getBody());
|
||||
$self->assertEquals("ContentControllerTestPageWithoutController", trim($response->getBody()));
|
||||
|
||||
// // This should fall over to user Page.ss
|
||||
$page = new ContentControllerTestPage();
|
||||
@ -158,7 +158,7 @@ class ContentControllerTest extends FunctionalTest {
|
||||
$page->publish("Stage", "Live");
|
||||
|
||||
$response = $self->get($page->RelativeLink());
|
||||
$self->assertEquals("Page", $response->getBody());
|
||||
$self->assertEquals("Page", trim($response->getBody()));
|
||||
|
||||
|
||||
// Test that the action template is rendered.
|
||||
@ -168,12 +168,12 @@ class ContentControllerTest extends FunctionalTest {
|
||||
$page->publish("Stage", "Live");
|
||||
|
||||
$response = $self->get($page->RelativeLink("test"));
|
||||
$self->assertEquals("ContentControllerTestPage_test", $response->getBody());
|
||||
$self->assertEquals("ContentControllerTestPage_test", trim($response->getBody()));
|
||||
|
||||
// Test that an action without a template will default to the index template, which is
|
||||
// to say the default Page.ss template
|
||||
$response = $self->get($page->RelativeLink("testwithouttemplate"));
|
||||
$self->assertEquals("Page", $response->getBody());
|
||||
$self->assertEquals("Page", trim($response->getBody()));
|
||||
|
||||
// Test that an action with a template will render the both action template *and* the
|
||||
// correct parent template
|
||||
|
Loading…
Reference in New Issue
Block a user