|
10 | 10 | use Symfony\Component\Console\Input\InputDefinition;
|
11 | 11 | use Symfony\Component\Console\Input\InputArgument;
|
12 | 12 |
|
| 13 | +/** |
| 14 | + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) |
| 15 | + */ |
13 | 16 | class JobSetCacheTest extends \PHPUnit_Framework_TestCase
|
14 | 17 | {
|
15 | 18 | /**
|
16 | 19 | * @dataProvider setCacheDataProvider
|
17 | 20 | * @param string $commandClass
|
18 |
| - * @param string $arrayInput |
| 21 | + * @param array $arrayInput |
19 | 22 | * @param string $jobName
|
20 | 23 | * @param array $params
|
21 | 24 | */
|
22 | 25 | public function testSetCache($commandClass, $arrayInput, $jobName, $params)
|
23 | 26 | {
|
| 27 | + $arrayInput = new ArrayInput($arrayInput); |
24 | 28 | $objectManagerProvider = $this->getMock(\Magento\Setup\Model\ObjectManagerProvider::class, [], [], '', false);
|
25 | 29 | $objectManager =
|
26 | 30 | $this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class, [], '', false);
|
@@ -62,18 +66,16 @@ public function testSetCache($commandClass, $arrayInput, $jobName, $params)
|
62 | 66 | */
|
63 | 67 | public function setCacheDataProvider()
|
64 | 68 | {
|
65 |
| - $cacheEnable = new ArrayInput(['command' => 'cache:enable', 'types' => ['cache1']]); |
66 |
| - $cacheDisable = new ArrayInput(['command' => 'cache:disable']); |
67 | 69 | return [
|
68 | 70 | [
|
69 | 71 | \Magento\Backend\Console\Command\CacheEnableCommand::class,
|
70 |
| - $cacheEnable, |
| 72 | + ['command' => 'cache:enable', 'types' => ['cache1']], |
71 | 73 | 'setup:cache:enable',
|
72 | 74 | ['cache1']
|
73 | 75 | ],
|
74 | 76 | [
|
75 | 77 | \Magento\Backend\Console\Command\CacheDisableCommand::class,
|
76 |
| - $cacheDisable, |
| 78 | + ['command' => 'cache:disable'], |
77 | 79 | 'setup:cache:disable',
|
78 | 80 | []
|
79 | 81 | ],
|
|
0 commit comments