Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit f0111a9

Browse files
author
Magento CICD
authored
MAGETWO-64903: [GitHub][PR] Fix #8308: test setup/src/Magento/Setup/Test/Unit/Model/Cron/JobSetCacheTest.php crashes in debug mode magento/magento2#8611
2 parents 995015c + 8139ceb commit f0111a9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

setup/src/Magento/Setup/Test/Unit/Model/Cron/JobSetCacheTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@
1010
use Symfony\Component\Console\Input\InputDefinition;
1111
use Symfony\Component\Console\Input\InputArgument;
1212

13+
/**
14+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
15+
*/
1316
class JobSetCacheTest extends \PHPUnit_Framework_TestCase
1417
{
1518
/**
1619
* @dataProvider setCacheDataProvider
1720
* @param string $commandClass
18-
* @param string $arrayInput
21+
* @param array $arrayInput
1922
* @param string $jobName
2023
* @param array $params
2124
*/
2225
public function testSetCache($commandClass, $arrayInput, $jobName, $params)
2326
{
27+
$arrayInput = new ArrayInput($arrayInput);
2428
$objectManagerProvider = $this->getMock(\Magento\Setup\Model\ObjectManagerProvider::class, [], [], '', false);
2529
$objectManager =
2630
$this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class, [], '', false);
@@ -62,18 +66,16 @@ public function testSetCache($commandClass, $arrayInput, $jobName, $params)
6266
*/
6367
public function setCacheDataProvider()
6468
{
65-
$cacheEnable = new ArrayInput(['command' => 'cache:enable', 'types' => ['cache1']]);
66-
$cacheDisable = new ArrayInput(['command' => 'cache:disable']);
6769
return [
6870
[
6971
\Magento\Backend\Console\Command\CacheEnableCommand::class,
70-
$cacheEnable,
72+
['command' => 'cache:enable', 'types' => ['cache1']],
7173
'setup:cache:enable',
7274
['cache1']
7375
],
7476
[
7577
\Magento\Backend\Console\Command\CacheDisableCommand::class,
76-
$cacheDisable,
78+
['command' => 'cache:disable'],
7779
'setup:cache:disable',
7880
[]
7981
],

0 commit comments

Comments
 (0)