From 8d48fd346467aa2267a97fc838d42c33a7399138 Mon Sep 17 00:00:00 2001 From: Magento EngCom Team Date: Wed, 24 Jan 2018 12:08:53 -0600 Subject: [PATCH] :arrow_double_up: Forwardport of magento/magento2#12310 to 2.3-develop branch Applied pull request patch https://github.com/magento/magento2/pull/12310.patch (created by @tufahu) based on commit(s): 1. 8fc99b164bb0717a631fe61d080ac24314d4bfd0 2. 36dfdca9b74f9df5bb3ad1f71cc51e782f2af379 3. 5c024025593a701df675842fe7136dbe23df59fb 4. 2eada9caa499963cb9083d7d72602f149114dfc6 5. e9986c5ac7abdca30c20b416913c9458d974e5ad --- app/code/Magento/Robots/Controller/Index/Index.php | 1 + .../Magento/Robots/Test/Unit/Controller/Index/IndexTest.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/code/Magento/Robots/Controller/Index/Index.php b/app/code/Magento/Robots/Controller/Index/Index.php index b94626e93432d..679066d723dce 100644 --- a/app/code/Magento/Robots/Controller/Index/Index.php +++ b/app/code/Magento/Robots/Controller/Index/Index.php @@ -43,6 +43,7 @@ public function execute() /** @var Page $resultPage */ $resultPage = $this->resultPageFactory->create(true); $resultPage->addHandle('robots_index_index'); + $resultPage->setHeader('Content-Type', 'text/plain'); return $resultPage; } } diff --git a/app/code/Magento/Robots/Test/Unit/Controller/Index/IndexTest.php b/app/code/Magento/Robots/Test/Unit/Controller/Index/IndexTest.php index 22a69cc13bd52..d3a7a97c7ea80 100644 --- a/app/code/Magento/Robots/Test/Unit/Controller/Index/IndexTest.php +++ b/app/code/Magento/Robots/Test/Unit/Controller/Index/IndexTest.php @@ -51,6 +51,9 @@ public function testExecute() $resultPageMock->expects($this->once()) ->method('addHandle') ->with('robots_index_index'); + $resultPageMock->expects($this->once()) + ->method('setHeader') + ->with('Content-Type', 'text/plain'); $this->resultPageFactory->expects($this->any()) ->method('create')