Skip to content

Commit f31fdc9

Browse files
committed
IBX-8180: Added integration test
1 parent b64dbe1 commit f31fdc9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/bundle/Functional/LocationTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,23 @@ public function testMoveLocation(string $locationHref): void
283283
self::assertHttpResponseCodeEquals($response, 201);
284284
self::assertHttpResponseHasHeader($response, 'Location');
285285
}
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+
}
286305
}

0 commit comments

Comments
 (0)