Skip to content

Commit 821356c

Browse files
committed
Merge remote-tracking branch 'origin/AC-9499' into Hammer_PlatForm_Health_247Beta3_03Jan23
2 parents 42096b9 + 9a3c08d commit 821356c

File tree

7 files changed

+101
-46
lines changed

7 files changed

+101
-46
lines changed

app/code/Magento/AwsS3/Test/Mftf/Helper/MockTestLogger.php

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,107 @@
1414
*
1515
* Ignores most log messages but throws errors on error/critical/emergency logs so tests will fail
1616
*/
17-
class MockTestLogger implements LoggerInterface {
18-
19-
public function emergency($message, array $context = array())
17+
class MockTestLogger implements LoggerInterface
18+
{
19+
/**
20+
* @param $message
21+
* @param array $context
22+
* @return void
23+
* @throws \Exception
24+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
25+
*/
26+
public function emergency($message, array $context = []): void
2027
{
2128
throw new \Exception($message);
2229
}
2330

24-
public function alert($message, array $context = array())
31+
/**
32+
* @param $message
33+
* @param array $context
34+
* @return void
35+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
36+
*/
37+
public function alert($message, array $context = []): void
2538
{
2639
// noop
2740
}
2841

29-
public function critical($message, array $context = array())
42+
/**
43+
* @param $message
44+
* @param array $context
45+
* @return void
46+
* @throws \Exception
47+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
48+
*/
49+
public function critical($message, array $context = []): void
3050
{
3151
throw new \Exception($message);
3252
}
3353

34-
public function error($message, array $context = array())
54+
/**
55+
* @param $message
56+
* @param array $context
57+
* @return void
58+
* @throws \Exception
59+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
60+
*/
61+
public function error($message, array $context = []): void
3562
{
3663
throw new \Exception($message);
3764
}
3865

39-
public function warning($message, array $context = array())
66+
/**
67+
* @param $message
68+
* @param array $context
69+
* @return void
70+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
71+
*/
72+
public function warning($message, array $context = []): void
4073
{
4174
// noop
4275
}
4376

44-
public function notice($message, array $context = array())
77+
/**
78+
* @param $message
79+
* @param array $context
80+
* @return void
81+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
82+
*/
83+
public function notice($message, array $context = []): void
4584
{
4685
// noop
4786
}
4887

49-
public function info($message, array $context = array())
88+
/**
89+
* @param $message
90+
* @param array $context
91+
* @return void
92+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
93+
*/
94+
public function info($message, array $context = []): void
5095
{
5196
// noop
5297
}
5398

54-
public function debug($message, array $context = array())
99+
/**
100+
* @param $message
101+
* @param array $context
102+
* @return void
103+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
104+
*/
105+
public function debug($message, array $context = []): void
55106
{
56107
// noop
57108
}
58109

59-
public function log($level, $message, array $context = array())
110+
/**
111+
* @param $level
112+
* @param $message
113+
* @param array $context
114+
* @return void
115+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
116+
*/
117+
public function log($level, $message, array $context = []): void
60118
{
61119
// noop
62120
}

app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ public function testExecuteWithException()
201201

202202
$this->loggerMock->expects($this->once())
203203
->method('critical')
204-
->with($exception)
205-
->willReturn(null);
204+
->with($exception);
206205

207206
$this->sidebarMock->expects($this->once())
208207
->method('getResponseData')

app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/UpdateItemQtyTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ public function testExecuteWithException(): void
217217

218218
$this->loggerMock->expects($this->once())
219219
->method('critical')
220-
->with($exception)
221-
->willReturn(null);
220+
->with($exception);
222221

223222
$this->sidebarMock->expects($this->once())
224223
->method('getResponseData')

app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ReorderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ public function testExecuteReorderWithThrowsLocalizedException(): void
343343
->willThrowException($exception);
344344
$this->loggerMock
345345
->expects($this->any())
346-
->method('critical')
347-
->willReturn($exception);
346+
->method('critical');
348347
$this->messageManagerMock
349348
->expects($this->once())
350349
->method('addErrorMessage')

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"symfony/string": "^6.4",
8888
"tedivm/jshrink": "^1.4",
8989
"tubalmartin/cssmin": "^4.1",
90-
"web-token/jwt-framework": "^3.1",
90+
"web-token/jwt-framework": "^3.1, <3.2.9",
9191
"webonyx/graphql-php": "^15.0",
9292
"wikimedia/less.php": "^3.2"
9393
},

composer.lock

Lines changed: 27 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/internal/Magento/Framework/View/Test/Unit/Element/TemplateTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ public function testFetchViewWithNoFileName()
167167
->willReturn(false);
168168
$this->loggerMock->expects($this->once())
169169
->method('critical')
170-
->with($exception)
171-
->willReturn(null);
170+
->with($exception);
172171
$this->assertEquals($output, $this->block->fetchView($template));
173172
}
174173

0 commit comments

Comments
 (0)