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"]);