Skip to content

Commit 7d3732e

Browse files
committed
fix other tests
1 parent 346698e commit 7d3732e

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

tests/Backend/SOX/MergeRequestsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,21 +797,21 @@ public function testDeletedRowInBranchIsDeletedInDefaultAfterMerge(): void
797797
$components->getConfiguration($componentId, $configMain1);
798798
$this->fail('Config should be deleted in default branch');
799799
} catch (ClientException $e) {
800-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
800+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
801801
}
802802

803803
try {
804804
$components->getConfigurationRow($componentId, $configMain1, 'firstRow');
805805
$this->fail('Row should be deleted in default branch');
806806
} catch (ClientException $e) {
807-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
807+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
808808
}
809809

810810
try {
811811
$components->getConfigurationRow($componentId, $configMain1, 'secondRow');
812812
$this->fail('Row should be deleted in default branch');
813813
} catch (ClientException $e) {
814-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
814+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
815815
}
816816

817817
// test is firstRow deleted in config main-2 in default branch

tests/Common/BranchComponentTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public function testResetToDefault(): void
328328
$branchComponents->getConfiguration($componentId, $configurationId);
329329
$this->fail('Should have thrown');
330330
} catch (ClientException $e) {
331-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
331+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
332332
}
333333

334334
$branchComponents->resetToDefault($componentId, $configurationId);
@@ -373,7 +373,7 @@ public function testResetToDefault(): void
373373
$updatedConfigurationInBranch = $branchComponents->getConfiguration($componentId, $configurationId);
374374
$this->fail('Should have thrown');
375375
} catch (ClientException $e) {
376-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
376+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
377377
}
378378

379379
// can be reset when existing default and deleted branch (new config in default scenario)
@@ -385,7 +385,7 @@ public function testResetToDefault(): void
385385
$branchComponents->getConfiguration($componentId, $configurationId);
386386
$this->fail('Should have thrown');
387387
} catch (ClientException $e) {
388-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
388+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
389389
}
390390
$branchComponents->resetToDefault($componentId, $configurationId);
391391
// assert that exists in branch (won't throw 404)
@@ -409,7 +409,7 @@ public function testResetToDefault(): void
409409
$updatedConfigurationInBranch = $branchComponents->getConfiguration($componentId, $configurationId);
410410
$this->fail('Should have thrown as reset to purged means deleted');
411411
} catch (ClientException $e) {
412-
$this->assertSame('Configuration main-1 not found', $e->getMessage());
412+
$this->assertSame('Configuration "main-1" not found', $e->getMessage());
413413
}
414414
}
415415

@@ -471,8 +471,8 @@ public function testManipulationWithComponentConfigurations(): void
471471
$this->fail('Configuration should be deleted in the main branch');
472472
} catch (ClientException $e) {
473473
$this->assertSame(404, $e->getCode());
474-
$this->assertSame('notFound', $e->getStringCode());
475-
$this->assertStringContainsString('Configuration deleted-main not found', $e->getMessage());
474+
$this->assertSame('storage.configuration.notFound', $e->getStringCode());
475+
$this->assertStringContainsString('Configuration "deleted-main" not found', $e->getMessage());
476476
}
477477

478478
$branch = $this->createDevBranchForTestCase($this);
@@ -484,8 +484,8 @@ public function testManipulationWithComponentConfigurations(): void
484484
$this->fail('Configuration deleted in the main branch shouldn\'t exist in dev branch');
485485
} catch (ClientException $e) {
486486
$this->assertSame(404, $e->getCode());
487-
$this->assertSame('notFound', $e->getStringCode());
488-
$this->assertStringContainsString('Configuration deleted-main not found', $e->getMessage());
487+
$this->assertSame('storage.configuration.notFound', $e->getStringCode());
488+
$this->assertStringContainsString('Configuration "deleted-main" not found', $e->getMessage());
489489
}
490490

491491
$configFromMain = $branchComponents->getConfiguration($componentId, 'main-1');
@@ -643,8 +643,8 @@ public function testManipulationWithComponentConfigurations(): void
643643
$this->fail('Configuration created in main branch after branching shouldn\'t exist in dev branch');
644644
} catch (ClientException $e) {
645645
$this->assertSame(404, $e->getCode());
646-
$this->assertSame('notFound', $e->getStringCode());
647-
$this->assertStringContainsString('Configuration main-2 not found', $e->getMessage());
646+
$this->assertSame('storage.configuration.notFound', $e->getStringCode());
647+
$this->assertStringContainsString('Configuration "main-2" not found', $e->getMessage());
648648
}
649649

650650
$mainComponentDetail = $components->getConfiguration($componentId, 'main-1');
@@ -964,8 +964,8 @@ public function testManipulationWithComponentConfigurations(): void
964964
$this->fail('Configuration created in dev branch shouldn\'t exist in main branch');
965965
} catch (ClientException $e) {
966966
$this->assertSame(404, $e->getCode());
967-
$this->assertSame('notFound', $e->getStringCode());
968-
$this->assertStringContainsString('Configuration dev-branch-1 not found', $e->getMessage());
967+
$this->assertSame('storage.configuration.notFound', $e->getStringCode());
968+
$this->assertStringContainsString('Configuration "dev-branch-1" not found', $e->getMessage());
969969
}
970970

971971
//Update
@@ -1264,8 +1264,8 @@ public function testDeleteBranchConfiguration(): void
12641264
$this->fail('Configuration should be deleted in the dev branch');
12651265
} catch (ClientException $e) {
12661266
$this->assertSame(404, $e->getCode());
1267-
$this->assertSame('notFound', $e->getStringCode());
1268-
$this->assertStringContainsString('Configuration main-1 not found', $e->getMessage());
1267+
$this->assertSame('storage.configuration.notFound', $e->getStringCode());
1268+
$this->assertStringContainsString('Configuration "main-1" not found', $e->getMessage());
12691269
}
12701270

12711271
try {
@@ -1275,8 +1275,8 @@ public function testDeleteBranchConfiguration(): void
12751275
$this->fail('Configuration rows should not be listed in the dev branch');
12761276
} catch (ClientException $e) {
12771277
$this->assertSame(404, $e->getCode());
1278-
$this->assertSame('notFound', $e->getStringCode());
1279-
$this->assertStringContainsString('Configuration main-1 not found', $e->getMessage());
1278+
$this->assertSame('storage.configuration.notFound', $e->getStringCode());
1279+
$this->assertStringContainsString('Configuration "main-1" not found', $e->getMessage());
12801280
}
12811281

12821282
// check main branch

tests/Common/ConfigurationMetadataTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function testAddMetadata(): void
128128
$components->addConfigurationMetadata($configurationMetadataOptions);
129129
$this->fail('configuration desn\'t exist');
130130
} catch (ClientException $e) {
131-
$this->assertSame(sprintf('Configuration %s not found', $configurationNameMain1), $e->getMessage());
131+
$this->assertSame(sprintf('Configuration "%s" not found', $configurationNameMain1), $e->getMessage());
132132
$this->assertSame(404, $e->getCode());
133133
}
134134

@@ -138,7 +138,7 @@ public function testAddMetadata(): void
138138
->setConfigurationId($configurationNameMain1));
139139
$this->fail('configuration desn\'t exist');
140140
} catch (ClientException $e) {
141-
$this->assertSame(sprintf('Configuration %s not found', $configurationNameMain1), $e->getMessage());
141+
$this->assertSame(sprintf('Configuration "%s" not found', $configurationNameMain1), $e->getMessage());
142142
$this->assertSame(404, $e->getCode());
143143
}
144144

0 commit comments

Comments
 (0)