From c7129878780787151eae9edeb680b11c45535a34 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 31 Jan 2022 15:01:58 +0100 Subject: send request id in response header Signed-off-by: Robin Appelman --- tests/lib/AppFramework/Controller/ControllerTest.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/lib/AppFramework/Controller/ControllerTest.php') diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index d874ec48247..1d72482e75d 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -28,6 +28,7 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\JSONResponse; use OCP\IConfig; +use OCP\IRequest; class ChildController extends Controller { public function __construct($appName, $request) { @@ -59,6 +60,7 @@ class ControllerTest extends \Test\TestCase { */ private $controller; private $app; + private $request; protected function setUp(): void { parent::setUp(); @@ -90,6 +92,8 @@ class ControllerTest extends \Test\TestCase { ->willReturn('apptemplate_advanced'); $this->controller = new ChildController($this->app, $request); + $this->overwriteService(IRequest::class, $request); + $this->request = $request; } @@ -114,6 +118,7 @@ class ControllerTest extends \Test\TestCase { 'Content-Type' => 'application/json; charset=utf-8', 'Content-Security-Policy' => "default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'", 'Feature-Policy' => "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'", + 'X-Request-Id' => $this->request->getId(), 'X-Robots-Tag' => 'none', ]; -- cgit v1.2.3