Skip to content

Commit f541f49

Browse files
committed
Merge remote-tracking branch 'origin/webapi_test' into phpunit10
2 parents dfa9a87 + 8d87676 commit f541f49

File tree

446 files changed

+2421
-1945
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+2421
-1945
lines changed

app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ public function testDispatchRunJob(): void
706706
->with('cron_job_run', ['job_name' => 'cron/test_group/test_job1']);
707707

708708
$dateScheduledAt = date('Y-m-d H:i:s', $this->time - 86400);
709-
$addScheduleMethods = [
709+
$scheduleMethods = [
710710
'getJobCode',
711711
'getScheduledAt',
712712
'setStatus',

app/code/Magento/Deploy/Test/Unit/Model/FilesystemTest.php

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,21 @@ public function testRegenerateStatic(): void
149149
$this->shell
150150
->expects($this->exactly(4))
151151
->method('execute')
152-
->willReturnCallback(function ($arg) use ($cacheFlushCmd, $setupDiCompileCmd, $staticContentDeployCmd) {
153-
if ($arg == $cacheFlushCmd ||
154-
$arg == $setupDiCompileCmd ||
155-
$arg == $staticContentDeployCmd) {
156-
return "Compilation complete";
152+
->willReturnCallback(function ($arg1) use ($cacheFlushCmd, $setupDiCompileCmd, $staticContentDeployCmd) {
153+
if ($arg1 == $cacheFlushCmd || $arg1 == $setupDiCompileCmd || $arg1 == $staticContentDeployCmd) {
154+
return null;
157155
}
158156
});
159157

160158
$this->output
161159
->method('writeln')
162-
->willReturnCallback(function ($arg) {
163-
if ($arg == 'Starting compilation' ||
164-
$arg == 'Compilation complete' ||
165-
$arg == 'Starting deployment of static content' ||
166-
$arg == 'Deployment of static content complete' ||
167-
empty($arg)
168-
) {
160+
->willReturnCallback(function ($arg1) {
161+
if ($arg1 == 'Starting compilation' ||
162+
$arg1 == 'Compilation complete' ||
163+
$arg1 == 'Starting deployment of static content' ||
164+
$arg1 == 'Deployment of static content complete' ||
165+
empty($arg1)
166+
) {
169167
return null;
170168
}
171169
});
@@ -194,13 +192,8 @@ public function testGenerateStaticForNotAllowedStoreViewLocale(): void
194192
$this->shell
195193
->expects($this->exactly(3))
196194
->method('execute')
197-
->willReturnCallback(function ($arg) use ($cacheFlushCmd, $setupDiCompileCmd, $staticContentDeployCmd) {
198-
if ($arg == $cacheFlushCmd ||
199-
$arg == $setupDiCompileCmd ||
200-
$arg == $staticContentDeployCmd) {
201-
return "Compilation complete";
202-
}
203-
});
195+
->withConsecutive([$cacheFlushCmd], [$setupDiCompileCmd], [$cacheFlushCmd], [$staticContentDeployCmd])
196+
->willReturn("Compilation complete");
204197

205198
$this->initAdminLocaleMock('en_US');
206199

@@ -228,13 +221,8 @@ public function testGenerateStaticForNotAllowedAdminLocale(): void
228221
$this->shell
229222
->expects($this->exactly(3))
230223
->method('execute')
231-
->willReturnCallback(function ($arg) use ($cacheFlushCmd, $setupDiCompileCmd, $staticContentDeployCmd) {
232-
if ($arg == $cacheFlushCmd ||
233-
$arg == $setupDiCompileCmd ||
234-
$arg == $staticContentDeployCmd) {
235-
return "Compilation complete";
236-
}
237-
});
224+
->withConsecutive([$cacheFlushCmd], [$setupDiCompileCmd], [$cacheFlushCmd], [$staticContentDeployCmd])
225+
->willReturn("Compilation complete");
238226

239227
$this->initAdminLocaleMock(';echo');
240228

@@ -259,4 +247,4 @@ private function initAdminLocaleMock($locale): void
259247
$this->userCollection->method('getIterator')
260248
->willReturn(new \ArrayIterator([$user]));
261249
}
262-
}
250+
}

app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ protected function setUp(): void
254254
$this->randomMock = $this->getMockForAbstractClass(Random::class);
255255
$this->upload = $this->createMock(Upload::class);
256256
$this->localeEmulator = $this->getMockForAbstractClass(LocaleEmulatorInterface::class);
257-
258257
$this->import = $this->getMockBuilder(Import::class)
259258
->setConstructorArgs(
260259
[

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"pdepend/pdepend": "^2.10",
104104
"phpmd/phpmd": "^2.12",
105105
"phpstan/phpstan": "^1.9",
106-
"phpunit/phpunit": "^10.4",
106+
"phpunit/phpunit": "^10.5",
107107
"symfony/finder": "^6.4"
108108
},
109109
"repositories": [

0 commit comments

Comments
 (0)