We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b64dbe1 commit f31fdc9Copy full SHA for f31fdc9
tests/bundle/Functional/LocationTest.php
@@ -283,4 +283,23 @@ public function testMoveLocation(string $locationHref): void
283
self::assertHttpResponseCodeEquals($response, 201);
284
self::assertHttpResponseHasHeader($response, 'Location');
285
}
286
+
287
+ /**
288
+ * @depends testMoveLocation
289
+ */
290
+ public function testSwap(string $locationHref): void
291
+ {
292
+ $request = $this->createHttpRequest(
293
+ 'POST',
294
+ $locationHref,
295
+ 'SwapLocationInput+json',
296
+ '',
297
+ json_encode(['SwapLocationInput' => ['destination' => '/1/5']]) ?: '',
298
+ );
299
300
+ $response = $this->sendHttpRequest($request);
301
302
+ self::assertHttpResponseCodeEquals($response, 204);
303
+ self::assertHttpResponseHasHeader($response, 'Location');
304
+ }
305
0 commit comments