Skip to content

Commit 3669589

Browse files
authored
test: fix php unit test (#1014)
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
1 parent 0e2a19e commit 3669589

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)