From be09d73d4d8138a8468a3127a9260d340d5eea14 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Fri, 24 Apr 2026 10:55:04 +0545 Subject: [PATCH] test: fix php unit test Signed-off-by: nabim777 --- tests/lib/Controller/OpenProjectAPIControllerTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/lib/Controller/OpenProjectAPIControllerTest.php b/tests/lib/Controller/OpenProjectAPIControllerTest.php index 1f60b2c8a..0cd8ce349 100644 --- a/tests/lib/Controller/OpenProjectAPIControllerTest.php +++ b/tests/lib/Controller/OpenProjectAPIControllerTest.php @@ -230,8 +230,8 @@ public function testGetOpenProjectAvatar(string $authorizationMethod) { ]); $response = $controller->getOpenProjectAvatar('id', 'name'); $this->assertSame('some image data', $response->render()); - $this->assertSame( - "attachment; filename=\"avatar\"", + $this->assertMatchesRegularExpression( + '/attachment; filename="?avatar"?/', $response->getHeaders()["Content-Disposition"] ); $this->assertSame( @@ -267,8 +267,8 @@ public function testGetOpenProjectAvatarNoType(string $authorizationMethod) { ]); $response = $controller->getOpenProjectAvatar('id', 'name'); $this->assertSame('some image data', $response->render()); - $this->assertSame( - "attachment; filename=\"avatar\"", + $this->assertMatchesRegularExpression( + '/attachment; filename="?avatar"?/', $response->getHeaders()["Content-Disposition"] ); $this->assertEmpty($response->getHeaders()["Content-Type"]);