Skip to content

Commit 95d3dde

Browse files
authored
Merge pull request #1013 from nextcloud/fix/php-unit-tests
test: fix content-disposition header assertion tests
1 parent 94e91e4 commit 95d3dde

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/lib/Controller/OpenProjectAPIControllerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ public function testGetOpenProjectAvatar(string $authorizationMethod) {
230230
]);
231231
$response = $controller->getOpenProjectAvatar('id', 'name');
232232
$this->assertSame('some image data', $response->render());
233-
$this->assertSame(
234-
"attachment; filename=\"avatar\"",
233+
$this->assertMatchesRegularExpression(
234+
'/attachment; filename="?avatar"?/',
235235
$response->getHeaders()["Content-Disposition"]
236236
);
237237
$this->assertSame(
@@ -267,8 +267,8 @@ public function testGetOpenProjectAvatarNoType(string $authorizationMethod) {
267267
]);
268268
$response = $controller->getOpenProjectAvatar('id', 'name');
269269
$this->assertSame('some image data', $response->render());
270-
$this->assertSame(
271-
"attachment; filename=\"avatar\"",
270+
$this->assertMatchesRegularExpression(
271+
'/attachment; filename="?avatar"?/',
272272
$response->getHeaders()["Content-Disposition"]
273273
);
274274
$this->assertEmpty($response->getHeaders()["Content-Type"]);

0 commit comments

Comments
 (0)