Skip to content

Commit 58ede28

Browse files
authored
Merge pull request #7047 from magento-commerce/platform-health
[Platform Health] Dependency Updates
2 parents ab815b5 + f0c22c9 commit 58ede28

File tree

576 files changed

+23285
-17995
lines changed

Some content is hidden

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

576 files changed

+23285
-17995
lines changed

app/code/Magento/AdminNotification/Test/Unit/Model/FeedTest.php

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,69 @@
2828
*/
2929
class FeedTest extends TestCase
3030
{
31-
/** @var Feed */
31+
/**
32+
* @var Feed
33+
*/
3234
protected $feed;
3335

34-
/** @var ObjectManagerHelper */
36+
/**
37+
* @var ObjectManagerHelper
38+
*/
3539
protected $objectManagerHelper;
3640

37-
/** @var InboxFactory|MockObject */
41+
/**
42+
* @var InboxFactory|MockObject
43+
*/
3844
protected $inboxFactory;
3945

40-
/** @var Inbox|MockObject */
46+
/**
47+
* @var Inbox|MockObject
48+
*/
4149
protected $inboxModel;
4250

43-
/** @var CurlFactory|MockObject */
51+
/**
52+
* @var CurlFactory|MockObject
53+
*/
4454
protected $curlFactory;
4555

46-
/** @var Curl|MockObject */
56+
/**
57+
* @var Curl|MockObject
58+
*/
4759
protected $curl;
4860

49-
/** @var ConfigInterface|MockObject */
61+
/**
62+
* @var ConfigInterface|MockObject
63+
*/
5064
protected $backendConfig;
5165

52-
/** @var CacheInterface|MockObject */
66+
/**
67+
* @var CacheInterface|MockObject
68+
*/
5369
protected $cacheManager;
5470

55-
/** @var State|MockObject */
71+
/**
72+
* @var State|MockObject
73+
*/
5674
protected $appState;
5775

58-
/** @var DeploymentConfig|MockObject */
76+
/**
77+
* @var DeploymentConfig|MockObject
78+
*/
5979
protected $deploymentConfig;
6080

61-
/** @var ProductMetadata|MockObject */
81+
/**
82+
* @var ProductMetadata|MockObject
83+
*/
6284
protected $productMetadata;
6385

64-
/** @var UrlInterface|MockObject */
86+
/**
87+
* @var UrlInterface|MockObject
88+
*/
6589
protected $urlBuilder;
6690

91+
/**
92+
* @inheritDoc
93+
*/
6794
protected function setUp(): void
6895
{
6996
$this->inboxFactory = $this->createPartialMock(
@@ -97,11 +124,8 @@ protected function setUp(): void
97124
);
98125

99126
$this->deploymentConfig = $this->createMock(DeploymentConfig::class);
100-
101127
$this->objectManagerHelper = new ObjectManagerHelper($this);
102-
103128
$this->productMetadata = $this->createMock(ProductMetadata::class);
104-
105129
$this->urlBuilder = $this->getMockForAbstractClass(UrlInterface::class);
106130

107131
$this->feed = $this->objectManagerHelper->getObject(
@@ -120,11 +144,13 @@ protected function setUp(): void
120144
}
121145

122146
/**
123-
* @dataProvider checkUpdateDataProvider
124147
* @param bool $callInbox
125148
* @param string $curlRequest
149+
*
150+
* @return void
151+
* @dataProvider checkUpdateDataProvider
126152
*/
127-
public function testCheckUpdate($callInbox, $curlRequest)
153+
public function testCheckUpdate(bool $callInbox, string $curlRequest): void
128154
{
129155
$mockName = 'Test Product Name';
130156
$mockVersion = '0.0.0';
@@ -144,16 +170,19 @@ public function testCheckUpdate($callInbox, $curlRequest)
144170

145171
$lastUpdate = 0;
146172
$this->cacheManager->expects($this->once())->method('load')->willReturn($lastUpdate);
147-
$this->curlFactory->expects($this->at(0))->method('create')->willReturn($this->curl);
173+
$this->curlFactory
174+
->method('create')
175+
->willReturn($this->curl);
148176
$this->curl->expects($this->once())->method('setConfig')->with($configValues)->willReturnSelf();
149177
$this->curl->expects($this->once())->method('read')->willReturn($curlRequest);
150-
$this->backendConfig->expects($this->at(0))->method('getValue')->willReturn('1');
151178
$this->backendConfig->expects($this->once())->method('isSetFlag')->willReturn(false);
152-
$this->backendConfig->expects($this->at(1))->method('getValue')
153-
->willReturn('http://feed.magento.com');
179+
$this->backendConfig
180+
->method('getValue')
181+
->willReturnOnConsecutiveCalls('1', 'http://feed.magento.com');
154182
$this->deploymentConfig->expects($this->once())->method('get')
155183
->with(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE)
156184
->willReturn('Sat, 6 Sep 2014 16:46:11 UTC');
185+
157186
if ($callInbox) {
158187
$this->inboxFactory->expects($this->once())->method('create')
159188
->willReturn($this->inboxModel);
@@ -188,7 +217,7 @@ function ($initialValue, $item) use ($data) {
188217
/**
189218
* @return array
190219
*/
191-
public function checkUpdateDataProvider()
220+
public function checkUpdateDataProvider(): array
192221
{
193222
return [
194223
[
@@ -246,7 +275,7 @@ public function checkUpdateDataProvider()
246275
</channel>
247276
</rss>'
248277
// @codingStandardsIgnoreEnd
249-
],
278+
]
250279
];
251280
}
252281
}

0 commit comments

Comments
 (0)