Skip to content

Commit 478f3c4

Browse files
committed
fix static and unit tests failures
1 parent 5ab4903 commit 478f3c4

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

lib/internal/Magento/Framework/Setup/Declaration/Schema/UpToDateDeclarativeSchema.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ private function initChangeTypeCount(array &$summary, string $operationType): vo
154154
/**
155155
* Build a structured array with information about a single change operation.
156156
*
157+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
157158
* @param mixed $change
158159
* @param string $operationType
159160
* @param int|string $changeIndex
@@ -224,6 +225,8 @@ private function isMethodExists(mixed $change, array $changeInfo): void
224225
/**
225226
* Safely get table name from any change object
226227
*
228+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
229+
* @SuppressWarnings(PHPMD.NPathComplexity)
227230
* @param mixed $change
228231
* @return string|null
229232
*/
@@ -281,6 +284,8 @@ private function safeGetTableName($change): ?string
281284
/**
282285
* Process ElementHistory object to extract useful information
283286
*
287+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
288+
* @SuppressWarnings(PHPMD.NPathComplexity)
284289
* @param ElementHistory $change
285290
* @param array $changeInfo
286291
* @return array

setup/src/Magento/Setup/Test/Unit/Console/Command/DbStatusCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testExecute()
104104
->willReturn(true);
105105
$tester = new CommandTester($this->command);
106106
$tester->execute([]);
107-
$this->assertStringMatchesFormat('All modules are up to date.', $tester->getDisplay());
107+
$this->assertStringMatchesFormat('%AAll modules are up to date.', $tester->getDisplay());
108108
$this->assertSame(0, $tester->getStatusCode());
109109
}
110110

@@ -117,7 +117,7 @@ public function testExecuteNotInstalled()
117117
$tester->execute([]);
118118

119119
$this->assertStringMatchesFormat(
120-
'No information is available: the Magento application is not installed.%w',
120+
'%ANo information is available: the Magento application is not installed.%w',
121121
$tester->getDisplay()
122122
);
123123
$this->assertSame(Cli::RETURN_FAILURE, $tester->getStatusCode());

setup/src/Magento/Setup/Test/Unit/Console/Command/UpgradeCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ public static function executeDataProvider(): array
134134
{
135135
$mediaGalleryNotice = "Media files stored outside of 'Media Gallery Allowed' folders will not be available "
136136
. "to the media gallery.\n"
137-
. "Please refer to Developer Guide for more details.\n";
137+
. "Please refer to Developer Guide for more details.\n"
138+
. "Upgrade completed successfully.\n";
138139

139140
return [
140141
[

0 commit comments

Comments
 (0)