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
View
Test
Unit
Asset
File
FallbackContextTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\Test\Unit\Asset\File
;
7
11
class
FallbackContextTest
extends
\PHPUnit\Framework\TestCase
12
{
16
protected
$objectManager
;
17
21
protected
$fallbackContext
;
22
23
protected
function
setUp
()
24
{
25
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
26
}
27
37
public
function
testGetConfigPath
(
38
$baseUrl,
39
$areaType,
40
$themePath,
41
$localeCode,
42
$expectedResult
43
) {
44
$this->fallbackContext = $this->objectManager->getObject(
45
\
Magento
\Framework\View\
Asset
\
File
\FallbackContext::class,
46
[
47
'baseUrl'
=> $baseUrl,
48
'areaType'
=> $areaType,
49
'themePath'
=> $themePath,
50
'localeCode'
=> $localeCode
51
]
52
);
53
$this->assertEquals($expectedResult, $this->fallbackContext->getConfigPath());
54
}
55
59
public
function
getConfigPathDataProvider
()
60
{
61
return
[
62
'http'
=> [
63
'baseUrl'
=>
'http://some-name.com/pub/static/'
,
64
'areaType'
=>
'frontend'
,
65
'themePath'
=>
'Magento/blank'
,
66
'localeCode'
=>
'en_US'
,
67
'expectedResult'
=>
'frontend/Magento/blank/en_US'
68
],
69
'https'
=> [
70
'baseUrl'
=>
'https://some-name.com/pub/static/'
,
71
'areaType'
=>
'frontend'
,
72
'themePath'
=>
'Magento/blank'
,
73
'localeCode'
=>
'en_US'
,
74
'expectedResult'
=>
'frontend/Magento/blank/en_US'
75
]
76
];
77
}
78
}
Magento\Framework\View\Test\Unit\Asset\File\FallbackContextTest\$fallbackContext
$fallbackContext
Definition:
FallbackContextTest.php:21
Magento\Framework\View\Test\Unit\Asset\File\FallbackContextTest\testGetConfigPath
testGetConfigPath( $baseUrl, $areaType, $themePath, $localeCode, $expectedResult)
Definition:
FallbackContextTest.php:37
Magento\Framework\View\Test\Unit\Asset\File\FallbackContextTest\getConfigPathDataProvider
getConfigPathDataProvider()
Definition:
FallbackContextTest.php:59
Magento\Framework\View\Asset
Definition:
Asset.php:10
Magento
Magento\Framework\View\Test\Unit\Asset\File\FallbackContextTest\setUp
setUp()
Definition:
FallbackContextTest.php:23
Magento\Framework\View\Test\Unit\Asset\File\FallbackContextTest\$objectManager
$objectManager
Definition:
FallbackContextTest.php:16
Magento\Framework\View\Test\Unit\Asset\File
Definition:
FallbackContextTest.php:6
Magento\Framework\View\Asset\File
Definition:
File.php:17
Magento\Framework\View\Test\Unit\Asset\File\FallbackContextTest
Definition:
FallbackContextTest.php:11