Skip to content

Commit 5565f1e

Browse files
committed
tests: clone
1 parent dac8bff commit 5565f1e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/TestCase/BEditaClientTest.php

+4-10
Original file line numberDiff line numberDiff line change
@@ -1441,15 +1441,9 @@ function ($document) {
14411441
static::assertArrayHasKey('attributes', $relationData['data']);
14421442
static::assertArrayHasKey('params', $relationData['data']['attributes']);
14431443

1444-
// test clone if BE version >= 5.36
1445-
$response = $this->client->get('/home');
1446-
$version = $response['meta']['version'];
1447-
$major = (int)explode('.', $version)[0];
1448-
$minor = (int)explode('.', $version)[1];
1449-
if ($major >= 5 && $minor >= 36) {
1450-
$clone = $this->client->clone('images', $mediaId, ['title' => 'Cloned image'], ['relationships', 'translations']);
1451-
static::assertNotEmpty($clone['data']['id']);
1452-
static::assertSame('Cloned image', $clone['data']['attributes']['title']);
1453-
}
1444+
// test clone
1445+
$clone = $this->client->clone('images', $mediaId, ['title' => 'Cloned image'], ['relationships', 'translations']);
1446+
static::assertNotEmpty($clone['data']['id']);
1447+
static::assertSame('Cloned image', $clone['data']['attributes']['title']);
14541448
}
14551449
}

0 commit comments

Comments
 (0)