Skip to content

Commit

Permalink
Merge pull request #1263 from keboola/zajca-ct-1238
Browse files Browse the repository at this point in the history
CT-1238 fix expected order of keys
  • Loading branch information
zajca authored Apr 22, 2024
2 parents cc67a3d + 0216281 commit 8131f8e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/Backend/CommonPart1/BranchStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testCreateBranchResponse(): void
$job['creatorToken']['id'],
$job['creatorToken']['description'],
);
$this->assertSame(
$this->assertEqualsCanonicalizing(
[
'status' => 'waiting',
'tableId' => null,
Expand Down Expand Up @@ -120,7 +120,7 @@ public function testCreateBranchResponse(): void
$jobDone['results']['creatorToken']['id'],
$jobDone['results']['creatorToken']['name'],
);
$this->assertSame(
$this->assertEqualsCanonicalizing(
[
'status' => 'success',
'tableId' => null,
Expand All @@ -134,8 +134,8 @@ public function testCreateBranchResponse(): void
],
'results' => [
'name' => $branchName,
'description' => '',
'isDefault' => false,
'description' => '',
'creatorToken' => [
],
],
Expand Down Expand Up @@ -167,11 +167,11 @@ public function testCreateBranchResponse(): void
$br['creatorToken']['name'],
);

$this->assertSame(
$this->assertEqualsCanonicalizing(
[
'name' => $branchName . '2',
'description' => '',
'isDefault' => false,
'description' => '',
'creatorToken' => [
],
],
Expand Down
15 changes: 12 additions & 3 deletions tests/Common/DevBranchesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ public function testAdminRoleBranchesPermissions(): void

$this->assertCount(3, $adminDevBranches->listBranches());

$this->assertSame($branch, $adminDevBranches->getBranch($branch['id']));
$this->assertSame($guestBranch, $adminDevBranches->getBranch($guestBranch['id']));
$this->assertEqualsCanonicalizing(
$branch,
$adminDevBranches->getBranch($branch['id']),
);
$this->assertEqualsCanonicalizing(
$guestBranch,
$adminDevBranches->getBranch($guestBranch['id']),
);

$adminDevBranches->deleteBranch($branch['id']);
$adminDevBranches->deleteBranch($guestBranch['id']);
Expand Down Expand Up @@ -205,7 +211,10 @@ public function testGuestRoleBranchesPermissions(): void

$this->assertCount(3, $branches->listBranches());

$this->assertSame($branch, $branches->getBranch($branch['id']));
$this->assertEqualsCanonicalizing(
$branch,
$branches->getBranch($branch['id']),
);

try {
$branches->deleteBranch($branch['id']);
Expand Down

0 comments on commit 8131f8e

Please sign in to comment.