X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FFunctional%2FForm%2FResponseTest.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FTests%2FForm%2FResponseTest.php;h=de5d8fd6c7a62483192c992e44f9bb5a6de8465a;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=e3064a5511aac3c680f195652328feeb55cf731d;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/system/src/Tests/Form/ResponseTest.php b/web/core/modules/system/tests/src/Functional/Form/ResponseTest.php similarity index 76% rename from web/core/modules/system/src/Tests/Form/ResponseTest.php rename to web/core/modules/system/tests/src/Functional/Form/ResponseTest.php index e3064a551..de5d8fd6c 100644 --- a/web/core/modules/system/src/Tests/Form/ResponseTest.php +++ b/web/core/modules/system/tests/src/Functional/Form/ResponseTest.php @@ -1,16 +1,16 @@ $this->randomString(), 'status' => 200, ]; - $content = Json::decode($this->drupalPostForm('form-test/response', $edit, 'Submit')); + $this->drupalPostForm('form-test/response', $edit, 'Submit'); + $content = Json::decode($this->getSession()->getPage()->getContent()); $this->assertResponse(200); $this->assertIdentical($edit['content'], $content, 'Response content matches'); $this->assertIdentical('invoked', $this->drupalGetHeader('X-Form-Test-Response-Event'), 'Response handled by kernel response subscriber'); @@ -37,7 +38,8 @@ class ResponseTest extends WebTestBase { 'content' => $this->randomString(), 'status' => 418, ]; - $content = Json::decode($this->drupalPostForm('form-test/response', $edit, 'Submit')); + $this->drupalPostForm('form-test/response', $edit, 'Submit'); + $content = Json::decode($this->getSession()->getPage()->getContent()); $this->assertResponse(418); $this->assertIdentical($edit['content'], $content, 'Response content matches'); $this->assertIdentical('invoked', $this->drupalGetHeader('X-Form-Test-Response-Event'), 'Response handled by kernel response subscriber');