Skip to content

Commit 9f6427b

Browse files
fixed php-unit tests
1 parent a27e247 commit 9f6427b

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎ProcessMaker/Models/Bundle.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public function installSettingsPayloads(array $payloads, $mode, $logger = null)
344344
$logger->status('Installing bundle settings on the this instance');
345345
$logger->setSteps($payloads[0]);
346346
$assets[] = DevLink::import($payload[0], $options, $logger);
347-
} else {
347+
} elseif (isset($payload[0]['setting_type'])) {
348348
switch ($payload[0]['setting_type']) {
349349
case 'auth_clients':
350350
$clientRepository->create(

‎tests/Model/BundleTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public function testReinstallBundle()
7474

7575
// Local
7676
$bundle = Bundle::factory()->create();
77-
$bundle->install($payloads, 'copy');
77+
$bundle->install($payloads, 'update');
78+
$bundle->savePayloadsToFile($payloads, [0 => []], null);
7879

7980
$screen = Screen::where('uuid', $screenUuid)->firstOrFail();
8081
$screen->title = 'New Screen Name';

‎tests/Model/DevLinkTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testInstallRemoteBundle()
114114
$this->assertCount(1, $media);
115115
$gzPath = $media[0]->getPath();
116116
$payloads = json_decode(gzdecode(file_get_contents($gzPath)), true);
117-
$this->assertCount(2, $payloads);
117+
$this->assertCount(3, $payloads);
118118
}
119119

120120
public function testRemoteBundles()

0 commit comments

Comments
 (0)