Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-backend
Test
Unit
Console
Command
AbstractCacheManageCommandTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Backend\Test\Unit\Console\Command
;
8
9
use Symfony\Component\Console\Tester\CommandTester;
10
11
abstract
class
AbstractCacheManageCommandTest
extends
AbstractCacheCommandTest
12
{
14
protected
$cacheEventName
;
15
17
protected
$eventManagerMock
;
18
19
protected
function
setUp
()
20
{
21
$this->eventManagerMock = $this->getMockBuilder(\
Magento
\Framework\Event\ManagerInterface::class)
22
->disableOriginalConstructor()
23
->getMock();
24
parent::setUp();
25
}
26
30
public
function
executeDataProvider
()
31
{
32
return
[
33
'implicit all'
=> [
34
[],
35
[
'A'
,
'B'
,
'C'
],
36
$this->
getExpectedExecutionOutput
([
'A'
,
'B'
,
'C'
]),
37
],
38
'specified types'
=> [
39
[
'types'
=> [
'A'
,
'B'
]],
40
[
'A'
,
'B'
],
41
$this->
getExpectedExecutionOutput
([
'A'
,
'B'
]),
42
],
43
];
44
}
45
50
public
function
testExecuteInvalidCacheType
()
51
{
52
$this->cacheManagerMock->expects($this->once())->method(
'getAvailableTypes'
)->willReturn([
'A'
,
'B'
,
'C'
]);
53
$param = [
'types'
=> [
'A'
,
'D'
]];
54
$commandTester =
new
CommandTester($this->command);
55
$commandTester->execute($param);
56
}
57
}
Magento\Backend\Test\Unit\Console\Command
Definition:
AbstractCacheCommandTest.php:7
Magento\Backend\Test\Unit\Console\Command\AbstractCacheManageCommandTest
Definition:
AbstractCacheManageCommandTest.php:11
Magento\Backend\Test\Unit\Console\Command\AbstractCacheManageCommandTest\executeDataProvider
executeDataProvider()
Definition:
AbstractCacheManageCommandTest.php:30
Magento\Backend\Test\Unit\Console\Command\AbstractCacheManageCommandTest\$cacheEventName
$cacheEventName
Definition:
AbstractCacheManageCommandTest.php:14
Magento\Backend\Test\Unit\Console\Command\AbstractCacheManageCommandTest\testExecuteInvalidCacheType
testExecuteInvalidCacheType()
Definition:
AbstractCacheManageCommandTest.php:50
Magento\Backend\Test\Unit\Console\Command\AbstractCacheCommandTest
Definition:
AbstractCacheCommandTest.php:11
Magento\Backend\Test\Unit\Console\Command\AbstractCacheCommandTest\getExpectedExecutionOutput
getExpectedExecutionOutput(array $types)
Magento
Magento\Backend\Test\Unit\Console\Command\AbstractCacheManageCommandTest\setUp
setUp()
Definition:
AbstractCacheManageCommandTest.php:19
Magento\Backend\Test\Unit\Console\Command\AbstractCacheManageCommandTest\$eventManagerMock
$eventManagerMock
Definition:
AbstractCacheManageCommandTest.php:17