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
framework
Cache
Test
Unit
ConfigTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Cache\Test\Unit
;
7
8
class
ConfigTest
extends
\PHPUnit\Framework\TestCase
9
{
13
protected
$_storage
;
14
18
protected
$_model
;
19
20
protected
function
setUp
()
21
{
22
$this->_storage = $this->createPartialMock(\
Magento
\Framework\Cache\
Config
\Data::class, [
'get'
]);
23
$this->_model = new \Magento\Framework\Cache\Config($this->_storage);
24
}
25
26
public
function
testGetTypes
()
27
{
28
$this->_storage->expects(
29
$this->once()
30
)->method(
31
'get'
32
)->with(
33
'types'
,
34
[]
35
)->will(
36
$this->returnValue([
'val1'
,
'val2'
])
37
);
38
$result
= $this->_model->getTypes();
39
$this->assertCount(2,
$result
);
40
}
41
42
public
function
testGetType
()
43
{
44
$this->_storage->expects(
45
$this->once()
46
)->method(
47
'get'
48
)->with(
49
'types/someType'
,
50
[]
51
)->will(
52
$this->returnValue([
'someTypeValue'
])
53
);
54
$result
= $this->_model->getType(
'someType'
);
55
$this->assertCount(1,
$result
);
56
}
57
}
Magento\Framework\Cache\Test\Unit\ConfigTest\testGetType
testGetType()
Definition:
ConfigTest.php:42
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Cache\Test\Unit\ConfigTest\setUp
setUp()
Definition:
ConfigTest.php:20
Magento\Framework\Cache\Test\Unit\ConfigTest
Definition:
ConfigTest.php:8
Magento\Framework\Cache\Config
Definition:
Config.php:10
Magento\Framework\Cache\Test\Unit
Magento
Magento\Framework\Cache\Test\Unit\ConfigTest\testGetTypes
testGetTypes()
Definition:
ConfigTest.php:26
Magento\Framework\Cache\Test\Unit\ConfigTest\$_model
$_model
Definition:
ConfigTest.php:18
Magento\Framework\Cache\Test\Unit\ConfigTest\$_storage
$_storage
Definition:
ConfigTest.php:13