From 87485e39f486737031500ddf8ba73c7246a51748 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Aug 2018 09:19:52 +1200 Subject: [PATCH] Loosen test assertion on content type for application/json See https://github.com/silverstripe/silverstripe-framework/issues/5594 This was changed in Silverstripe 4.3 --- tests/php/SubsiteXHRControllerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/php/SubsiteXHRControllerTest.php b/tests/php/SubsiteXHRControllerTest.php index ba6549d..5ec92fb 100644 --- a/tests/php/SubsiteXHRControllerTest.php +++ b/tests/php/SubsiteXHRControllerTest.php @@ -35,7 +35,8 @@ class SubsiteXHRControllerTest extends FunctionalTest ]); $this->assertEquals(200, $result->getStatusCode()); - $this->assertEquals('text/json', $result->getHeader('Content-Type')); + // SilverStripe 4.0-4.2: text/json. >=4.3: application/json + $this->assertContains('json', $result->getHeader('Content-Type')); $body = $result->getBody(); $this->assertContains('Main site', $body);