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-store
Test
Unit
Model
Config
Reader
Source
Initial
DefaultScopeTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Store\Test\Unit\Model\Config\Reader\Source\Initial
;
7
8
use
Magento\Framework\App\Config\ScopeConfigInterface
;
9
use
Magento\Store\Model\Config\Reader\Source\Initial\DefaultScope
;
10
use
Magento\Framework\App\Config\Scope\Converter
;
11
12
class
DefaultScopeTest
extends
\PHPUnit\Framework\TestCase
13
{
14
public
function
testGet
()
15
{
16
$initialConfig = $this->getMockBuilder(\
Magento
\Framework\
App
\
Config
\Initial::class)
17
->disableOriginalConstructor()
18
->getMock();
19
$initialConfig->expects($this->once())
20
->method(
'getData'
)
21
->with(
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
)
22
->willReturn([]);
23
$converter = $this->getMockBuilder(Converter::class)
24
->disableOriginalConstructor()
25
->getMock();
26
$converter->expects($this->once())
27
->method(
'convert'
)
28
->with([])
29
->willReturnArgument(0);
30
31
$defaultSource =
new
DefaultScope
($initialConfig, $converter);
32
$this->assertEquals([], $defaultSource->get());
33
}
34
}
Magento\Framework\App
Magento\Store\Test\Unit\Model\Config\Reader\Source\Initial
Definition:
DefaultScopeTest.php:6
Magento\Store\Test\Unit\Model\Config\Reader\Source\Initial\DefaultScopeTest
Definition:
DefaultScopeTest.php:12
Magento\Framework\App\Config\ScopeConfigInterface\SCOPE_TYPE_DEFAULT
const SCOPE_TYPE_DEFAULT
Definition:
ScopeConfigInterface.php:20
Magento\Store\Test\Unit\Model\Config\Reader\Source\Initial\DefaultScopeTest\testGet
testGet()
Definition:
DefaultScopeTest.php:14
Magento\Store\Model\Config\Reader\Source\Initial\DefaultScope
Definition:
DefaultScope.php:16
Magento
Magento\Framework\App\Config\Scope\Converter
Definition:
Converter.php:10
Magento\Framework\App\Config
Definition:
Config.php:17
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15