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,8 +149,8 @@ class ContentControllerTest extends FunctionalTest {
|
|||||||
$page->publish("Stage", "Live");
|
$page->publish("Stage", "Live");
|
||||||
|
|
||||||
$response = $self->get($page->RelativeLink());
|
$response = $self->get($page->RelativeLink());
|
||||||
$self->assertEquals("ContentControllerTestPageWithoutController", $response->getBody());
|
$self->assertEquals("ContentControllerTestPageWithoutController", trim($response->getBody()));
|
||||||
|
|
||||||
// // This should fall over to user Page.ss
|
// // This should fall over to user Page.ss
|
||||||
$page = new ContentControllerTestPage();
|
$page = new ContentControllerTestPage();
|
||||||
$page->URLSegment = "test";
|
$page->URLSegment = "test";
|
||||||
@ -158,7 +158,7 @@ class ContentControllerTest extends FunctionalTest {
|
|||||||
$page->publish("Stage", "Live");
|
$page->publish("Stage", "Live");
|
||||||
|
|
||||||
$response = $self->get($page->RelativeLink());
|
$response = $self->get($page->RelativeLink());
|
||||||
$self->assertEquals("Page", $response->getBody());
|
$self->assertEquals("Page", trim($response->getBody()));
|
||||||
|
|
||||||
|
|
||||||
// Test that the action template is rendered.
|
// Test that the action template is rendered.
|
||||||
@ -168,12 +168,12 @@ class ContentControllerTest extends FunctionalTest {
|
|||||||
$page->publish("Stage", "Live");
|
$page->publish("Stage", "Live");
|
||||||
|
|
||||||
$response = $self->get($page->RelativeLink("test"));
|
$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
|
// Test that an action without a template will default to the index template, which is
|
||||||
// to say the default Page.ss template
|
// to say the default Page.ss template
|
||||||
$response = $self->get($page->RelativeLink("testwithouttemplate"));
|
$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
|
// Test that an action with a template will render the both action template *and* the
|
||||||
// correct parent template
|
// correct parent template
|
||||||
|
Loading…
Reference in New Issue
Block a user