Skip to content

Commit 6bf9ac8

Browse files
authored
feature/easy-api-platform-fix-test-for-4.3.0 (#1776)
1 parent 1fa91b3 commit 6bf9ac8

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

packages/EasyApiPlatform/tests/Application/src/Common/ReturnNotFoundOnReadOperation/WhenPostReturnNotFoundOnReadOperationTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ public function testItSucceedsWhenReturnNotFoundOnReadOperationsIsDisabled(): vo
5656
],
5757
]
5858
);
59-
self::assertSame(500, $response->getStatusCode());
60-
/** @var array $responseData */
61-
$responseData = \json_decode($response->getContent(false), true);
62-
self::assertSame(403, $responseData['custom_code']);
59+
60+
self::assertSame(200, $response->getStatusCode());
6361
}
6462

6563
public function testItSucceedsWithoutUriVariables(): void

packages/EasyApiPlatform/tests/Application/src/Common/ReturnNotFoundOnReadOperation/WhenPutReturnNotFoundOnReadOperationTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ public function testItSucceedsWhenReturnNotFoundOnReadOperationsIsDisabled(): vo
5656
],
5757
]
5858
);
59-
self::assertSame(500, $response->getStatusCode());
60-
/** @var array $responseData */
61-
$responseData = \json_decode($response->getContent(false), true);
62-
self::assertSame(403, $responseData['custom_code']);
59+
60+
self::assertSame(200, $response->getStatusCode());
6361
}
6462
}

packages/EasyApiPlatform/tests/Fixture/app/src/ReturnNotFoundOnReadOperation/ApiResource/Question.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
new Post(
1515
uriTemplate: '/questions/{id}/mark-as-answered',
1616
status: 200,
17-
security: 'is_granted("SOME_NOT_EXISTING_PERMISSION")',
1817
input: false,
1918
),
2019
new Post(),
2120
new Put(
2221
uriTemplate: '/questions/{id}/mark-as-answered',
2322
status: 200,
24-
security: 'is_granted("SOME_NOT_EXISTING_PERMISSION")',
2523
input: false,
2624
allowCreate: true,
2725
),

0 commit comments

Comments
 (0)