@@ -55,25 +55,25 @@ protected function setUp(): void
55
55
/**
56
56
* @dataProvider applyDisabledProvider
57
57
*/
58
- public function testApplyDisabled (array $ context , bool $ paginationEnabled , ?array $ expectedResult ): void
58
+ public function testApplyDisabled (Operation $ operation , bool $ paginationEnabled , ?array $ expectedResult ): void
59
59
{
60
60
$ resourceClass = 'myResource ' ;
61
61
/** @var Operation $operation */
62
- $ operation = ( new Query ()) ->withSerialize (false );
62
+ $ operation = $ operation ->withSerialize (false );
63
63
64
- $ result = ($ this ->createSerializeStage ($ paginationEnabled ))(null , $ resourceClass , $ operation , $ context );
64
+ $ result = ($ this ->createSerializeStage ($ paginationEnabled ))(null , $ resourceClass , $ operation , [] );
65
65
66
66
$ this ->assertSame ($ expectedResult , $ result );
67
67
}
68
68
69
69
public function applyDisabledProvider (): array
70
70
{
71
71
return [
72
- 'item ' => [[ ' is_collection ' => false , ' is_mutation ' => false , ' is_subscription ' => false ] , false , null ],
73
- 'collection with pagination ' => [[ ' is_collection ' => true , ' is_mutation ' => false , ' is_subscription ' => false ] , true , ['totalCount ' => 0. , 'edges ' => [], 'pageInfo ' => ['startCursor ' => null , 'endCursor ' => null , 'hasNextPage ' => false , 'hasPreviousPage ' => false ]]],
74
- 'collection without pagination ' => [[ ' is_collection ' => true , ' is_mutation ' => false , ' is_subscription ' => false ] , false , []],
75
- 'mutation ' => [[ ' is_collection ' => false , ' is_mutation ' => true , ' is_subscription ' => false ] , false , ['clientMutationId ' => null ]],
76
- 'subscription ' => [[ ' is_collection ' => false , ' is_mutation ' => false , ' is_subscription ' => true ] , false , ['clientSubscriptionId ' => null ]],
72
+ 'item ' => [new Query () , false , null ],
73
+ 'collection with pagination ' => [new QueryCollection () , true , ['totalCount ' => 0. , 'edges ' => [], 'pageInfo ' => ['startCursor ' => null , 'endCursor ' => null , 'hasNextPage ' => false , 'hasPreviousPage ' => false ]]],
74
+ 'collection without pagination ' => [new QueryCollection () , false , []],
75
+ 'mutation ' => [new Mutation () , false , ['clientMutationId ' => null ]],
76
+ 'subscription ' => [new Subscription () , false , ['clientSubscriptionId ' => null ]],
77
77
];
78
78
}
79
79
0 commit comments