@@ -27,14 +27,14 @@ public function testProvide(): void
27
27
{
28
28
$ objectToPopulate = null ;
29
29
$ context = ['args ' => ['input ' => ['test ' ]]];
30
- $ operation = new Mutation (class: ' dummy ' );
30
+ $ operation = new Mutation (class: \stdClass::class );
31
31
$ serializerContext = ['resource_class ' => $ operation ->getClass ()];
32
32
$ decorated = $ this ->createMock (ProviderInterface::class);
33
33
$ decorated ->expects ($ this ->once ())->method ('provide ' )->willReturn ($ objectToPopulate );
34
34
$ denormalizer = $ this ->createMock (DenormalizerInterface::class);
35
35
$ serializerContextBuilder = $ this ->createMock (SerializerContextBuilderInterface::class);
36
36
$ serializerContextBuilder ->expects ($ this ->once ())->method ('create ' )->with ($ operation ->getClass (), $ operation , $ context , false )->willReturn ($ serializerContext );
37
- $ denormalizer ->expects ($ this ->once ())->method ('denormalize ' )->with (['test ' ], ' dummy ' , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
37
+ $ denormalizer ->expects ($ this ->once ())->method ('denormalize ' )->with (['test ' ], \stdClass::class , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
38
38
$ provider = new DenormalizeProvider ($ decorated , $ denormalizer , $ serializerContextBuilder );
39
39
$ provider ->provide ($ operation , [], $ context );
40
40
}
@@ -43,14 +43,14 @@ public function testProvideWithObjectToPopulate(): void
43
43
{
44
44
$ objectToPopulate = new \stdClass ();
45
45
$ context = ['args ' => ['input ' => ['test ' ]]];
46
- $ operation = new Mutation (class: ' dummy ' );
46
+ $ operation = new Mutation (class: \stdClass::class );
47
47
$ serializerContext = ['resource_class ' => $ operation ->getClass (), 'object_to_populate ' => $ objectToPopulate ];
48
48
$ decorated = $ this ->createMock (ProviderInterface::class);
49
49
$ decorated ->expects ($ this ->once ())->method ('provide ' )->willReturn ($ objectToPopulate );
50
50
$ denormalizer = $ this ->createMock (DenormalizerInterface::class);
51
51
$ serializerContextBuilder = $ this ->createMock (SerializerContextBuilderInterface::class);
52
52
$ serializerContextBuilder ->expects ($ this ->once ())->method ('create ' )->with ($ operation ->getClass (), $ operation , $ context , false )->willReturn ($ serializerContext );
53
- $ denormalizer ->expects ($ this ->once ())->method ('denormalize ' )->with (['test ' ], ' dummy ' , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
53
+ $ denormalizer ->expects ($ this ->once ())->method ('denormalize ' )->with (['test ' ], \stdClass::class , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
54
54
$ provider = new DenormalizeProvider ($ decorated , $ denormalizer , $ serializerContextBuilder );
55
55
$ provider ->provide ($ operation , [], $ context );
56
56
}
@@ -59,14 +59,14 @@ public function testProvideNotCalledWithQuery(): void
59
59
{
60
60
$ objectToPopulate = new \stdClass ();
61
61
$ context = ['args ' => ['input ' => ['test ' ]]];
62
- $ operation = new Query (class: ' dummy ' );
62
+ $ operation = new Query (class: \stdClass::class );
63
63
$ serializerContext = ['resource_class ' => $ operation ->getClass ()];
64
64
$ decorated = $ this ->createMock (ProviderInterface::class);
65
65
$ decorated ->expects ($ this ->once ())->method ('provide ' )->willReturn ($ objectToPopulate );
66
66
$ denormalizer = $ this ->createMock (DenormalizerInterface::class);
67
67
$ serializerContextBuilder = $ this ->createMock (SerializerContextBuilderInterface::class);
68
68
$ serializerContextBuilder ->expects ($ this ->never ())->method ('create ' )->with ($ operation ->getClass (), $ operation , $ context , false )->willReturn ($ serializerContext );
69
- $ denormalizer ->expects ($ this ->never ())->method ('denormalize ' )->with (['test ' ], ' dummy ' , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
69
+ $ denormalizer ->expects ($ this ->never ())->method ('denormalize ' )->with (['test ' ], \stdClass::class , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
70
70
$ provider = new DenormalizeProvider ($ decorated , $ denormalizer , $ serializerContextBuilder );
71
71
$ provider ->provide ($ operation , [], $ context );
72
72
}
@@ -75,14 +75,14 @@ public function testProvideNotCalledWithoutDeserialize(): void
75
75
{
76
76
$ objectToPopulate = new \stdClass ();
77
77
$ context = ['args ' => ['input ' => ['test ' ]]];
78
- $ operation = new Query (class: ' dummy ' , deserialize: false );
78
+ $ operation = new Query (class: \stdClass::class , deserialize: false );
79
79
$ serializerContext = ['resource_class ' => $ operation ->getClass ()];
80
80
$ decorated = $ this ->createMock (ProviderInterface::class);
81
81
$ decorated ->expects ($ this ->once ())->method ('provide ' )->willReturn ($ objectToPopulate );
82
82
$ denormalizer = $ this ->createMock (DenormalizerInterface::class);
83
83
$ serializerContextBuilder = $ this ->createMock (SerializerContextBuilderInterface::class);
84
84
$ serializerContextBuilder ->expects ($ this ->never ())->method ('create ' )->with ($ operation ->getClass (), $ operation , $ context , false )->willReturn ($ serializerContext );
85
- $ denormalizer ->expects ($ this ->never ())->method ('denormalize ' )->with (['test ' ], ' dummy ' , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
85
+ $ denormalizer ->expects ($ this ->never ())->method ('denormalize ' )->with (['test ' ], \stdClass::class , 'graphql ' , $ serializerContext )->willReturn (new \stdClass ());
86
86
$ provider = new DenormalizeProvider ($ decorated , $ denormalizer , $ serializerContextBuilder );
87
87
$ provider ->provide ($ operation , [], $ context );
88
88
}
0 commit comments