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
AbstractCacheSetCommandTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Backend\Test\Unit\Console\Command
;
8
9
abstract
class
AbstractCacheSetCommandTest
extends
AbstractCacheManageCommandTest
10
{
14
public
function
executeDataProvider
()
15
{
16
return
[
17
'implicit all'
=> [
18
[],
19
[
'A'
,
'B'
,
'C'
],
20
[
'A'
,
'B'
,
'C'
],
21
$this->
getExpectedExecutionOutput
([
'A'
,
'B'
,
'C'
]),
22
],
23
'specified types'
=> [
24
[
'types'
=> [
'A'
,
'B'
]],
25
[
'A'
,
'B'
],
26
[
'A'
,
'B'
],
27
$this->
getExpectedExecutionOutput
([
'A'
,
'B'
]),
28
],
29
'no changes'
=> [
30
[
'types'
=> [
'A'
,
'B'
]],
31
[
'A'
,
'B'
],
32
[],
33
$this->
getExpectedExecutionOutput
([]),
34
],
35
];
36
}
37
45
public
function
getExpectedChangeOutput
(array
$changes
, $enabled)
46
{
47
if
(
$changes
) {
48
$output
=
'Changed cache status:'
. PHP_EOL;
49
foreach
(
$changes
as
$type
) {
50
$output
.= sprintf(
'%30s: %d -> %d'
,
$type
, $enabled ===
false
, $enabled ===
true
) . PHP_EOL;
51
}
52
}
else
{
53
$output
=
'There is nothing to change in cache status'
. PHP_EOL;
54
}
55
return
$output
;
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\AbstractCacheSetCommandTest\executeDataProvider
executeDataProvider()
Definition:
AbstractCacheSetCommandTest.php:14
$type
$type
Definition:
item.phtml:13
$changes
$changes
Definition:
get_github_changes.php:39
$output
$output
Definition:
classmap_generator.php:100
Magento\Backend\Test\Unit\Console\Command\AbstractCacheCommandTest\getExpectedExecutionOutput
getExpectedExecutionOutput(array $types)
Magento\Backend\Test\Unit\Console\Command\AbstractCacheSetCommandTest
Definition:
AbstractCacheSetCommandTest.php:9
Magento\Backend\Test\Unit\Console\Command\AbstractCacheSetCommandTest\getExpectedChangeOutput
getExpectedChangeOutput(array $changes, $enabled)
Definition:
AbstractCacheSetCommandTest.php:45