File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ Feature: Handle properly invalid data submitted to the API
100
100
"""
101
101
Then the response status code should be 400
102
102
And the response should be in JSON
103
- And the header "Content-Type" should be equal to "application/ld +json; charset=utf-8"
103
+ And the header "Content-Type" should be equal to "application/problem +json; charset=utf-8"
104
104
105
105
Scenario : Send non-array data when an array is expected
106
106
When I add "Content-Type" header equal to "application/ld+json"
Original file line number Diff line number Diff line change 14
14
namespace ApiPlatform \Tests \Functional ;
15
15
16
16
use ApiPlatform \Symfony \Bundle \Test \ApiTestCase ;
17
+ use ApiPlatform \Tests \Fixtures \TestBundle \ApiResource \Issue6718 \Organization ;
18
+ use ApiPlatform \Tests \SetupClassResourcesTrait ;
17
19
18
20
class ItemUriTemplateTest extends ApiTestCase
19
21
{
22
+ use SetupClassResourcesTrait;
23
+
24
+ /**
25
+ * @return class-string[]
26
+ */
27
+ public static function getResources (): array
28
+ {
29
+ return [Organization::class];
30
+ }
31
+
20
32
public function testIssue6718 (): void
21
33
{
22
34
self ::createClient ()->request ('GET ' , '/6718_users/1/organisation ' , [
Original file line number Diff line number Diff line change 16
16
use ApiPlatform \Symfony \Bundle \Test \ApiTestCase ;
17
17
use ApiPlatform \Tests \Fixtures \TestBundle \Entity \Issue6465 \Bar ;
18
18
use ApiPlatform \Tests \Fixtures \TestBundle \Entity \Issue6465 \Foo ;
19
+ use ApiPlatform \Tests \SetupClassResourcesTrait ;
19
20
use Doctrine \ORM \EntityManagerInterface ;
20
21
use Doctrine \ORM \Tools \SchemaTool ;
21
22
22
- class JsonLd extends ApiTestCase
23
+ class JsonLdTest extends ApiTestCase
23
24
{
25
+ use SetupClassResourcesTrait;
26
+
27
+ /**
28
+ * @return class-string[]
29
+ */
30
+ public static function getResources (): array
31
+ {
32
+ return [Foo::class, Bar::class];
33
+ }
34
+
24
35
/**
25
36
* The input DTO denormalizes an existing Doctrine entity.
26
37
*/
You can’t perform that action at this time.
0 commit comments