Skip to content

Commit c2cc727

Browse files
committed
Revert "fix: fix tests"
This reverts commit a582629.
1 parent c2c2c7b commit c2cc727

4 files changed

Lines changed: 7 additions & 61 deletions

File tree

tests/Functional/BackedEnumResourceTest.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,6 @@ public static function providerEnumItemsJson(): iterable
6969
'@context' => '/contexts/Availability',
7070
'@id' => '/availabilities/'.$case->value,
7171
'@type' => 'Availability',
72-
'operation' => [
73-
[
74-
'@type' => ['hydra:Operation', 'schema:FindAction'],
75-
'hydra:method' => 'GET',
76-
'hydra:title' => 'getAvailability',
77-
'hydra:description' => 'Retrieves a Availability resource.',
78-
'returns' => 'Availability',
79-
],
80-
],
8172
'value' => $case->value,
8273
]];
8374
}
@@ -109,15 +100,6 @@ public static function providerEnumItemsJson(): iterable
109100
'@context' => '/contexts/AvailabilityStatus',
110101
'@id' => '/availability_statuses/'.$case->value,
111102
'@type' => 'AvailabilityStatus',
112-
'operation' => [
113-
[
114-
'@type' => ['hydra:Operation', 'schema:FindAction'],
115-
'hydra:method' => 'GET',
116-
'hydra:title' => 'getAvailabilityStatus',
117-
'hydra:description' => 'Retrieves a AvailabilityStatus resource.',
118-
'returns' => 'AvailabilityStatus',
119-
],
120-
],
121103
'value' => $case->value,
122104
]];
123105
}
@@ -475,15 +457,6 @@ public static function providerItem(): iterable
475457
'@context' => '/contexts/BackedEnumIntegerResource',
476458
'@id' => '/backed_enum_integer_resources/1',
477459
'@type' => 'BackedEnumIntegerResource',
478-
'operation' => [
479-
[
480-
'@type' => ['hydra:Operation', 'schema:FindAction'],
481-
'hydra:method' => 'GET',
482-
'hydra:title' => 'getBackedEnumIntegerResource',
483-
'hydra:description' => 'Retrieves a BackedEnumIntegerResource resource.',
484-
'returns' => 'BackedEnumIntegerResource',
485-
],
486-
],
487460
'name' => 'Yes',
488461
'value' => 1,
489462
'description' => 'We say yes',

tests/Functional/MathNumberTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ public function testGetMathNumber(): void
5454
'@context' => '/contexts/MathNumber',
5555
'@id' => '/math_numbers/1',
5656
'@type' => 'MathNumber',
57-
'operation' => [
58-
[
59-
'@type' => ['hydra:Operation', 'schema:FindAction'],
60-
'hydra:method' => 'GET',
61-
'hydra:title' => 'getMathNumber',
62-
'hydra:description' => 'Retrieves a MathNumber resource.',
63-
'returns' => 'MathNumber',
64-
],
65-
],
6657
'id' => 1,
6758
'value' => '300.55',
6859
]);
@@ -83,15 +74,6 @@ public function testPostMathNumber(): void
8374
'@context' => '/contexts/MathNumber',
8475
'@id' => '/math_numbers/2',
8576
'@type' => 'MathNumber',
86-
'operation' => [
87-
[
88-
'@type' => ['hydra:Operation', 'schema:FindAction'],
89-
'hydra:method' => 'GET',
90-
'hydra:title' => 'getMathNumber',
91-
'hydra:description' => 'Retrieves a MathNumber resource.',
92-
'returns' => 'MathNumber',
93-
],
94-
],
9577
'id' => 2,
9678
'value' => '120.23',
9779
]);

tests/JsonLd/Serializer/ItemNormalizerTest.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,12 @@ public function testNormalize(): void
9090
);
9191
$normalizer->setSerializer($serializerProphecy->reveal());
9292

93-
$result = $normalizer->normalize($dummy);
94-
95-
$this->assertEquals('/contexts/Dummy', $result['@context']);
96-
$this->assertEquals('/dummies/1988', $result['@id']);
97-
$this->assertEquals('Dummy', $result['@type']);
98-
$this->assertEquals('hello', $result['name']);
99-
100-
$this->assertArrayHasKey('operation', $result);
101-
$this->assertIsArray($result['operation']);
102-
$this->assertCount(1, $result['operation']);
93+
$expected = [
94+
'@context' => '/contexts/Dummy',
95+
'@id' => '/dummies/1988',
96+
'@type' => 'Dummy',
97+
'name' => 'hello',
98+
];
99+
$this->assertEquals($expected, $normalizer->normalize($dummy));
103100
}
104101
}

tests/Symfony/Bundle/Test/ApiTestCaseTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,6 @@ public function testGetMercureMessages(): void
365365
"readOnly": true,
366366
"type": "string"
367367
},
368-
"operation": {
369-
"type": "array",
370-
"items": {
371-
"type": "object"
372-
}
373-
},
374368
"id": {
375369
"type": "number"
376370
},

0 commit comments

Comments
 (0)