diff options
author | Robin Appelman <robin@icewind.nl> | 2022-01-31 15:01:58 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-02-01 14:24:01 +0100 |
commit | c7129878780787151eae9edeb680b11c45535a34 (patch) | |
tree | 09e119b47dde3f04790103a35b0b017fbab16efa /tests/lib/AppFramework/Controller/ControllerTest.php | |
parent | d635d58d19d5ab65c0be754fc32fce99672c249f (diff) | |
download | nextcloud-server-c7129878780787151eae9edeb680b11c45535a34.tar.gz nextcloud-server-c7129878780787151eae9edeb680b11c45535a34.zip |
send request id in response header
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/AppFramework/Controller/ControllerTest.php')
-rw-r--r-- | tests/lib/AppFramework/Controller/ControllerTest.php | 5 |
1 files changed, 5 insertions, 0 deletions
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', ]; |