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
Design
FileResolution
Fallback
StaticFileTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback
;
8
9
use \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile;
10
11
use
Magento\Framework\View\Design\Fallback\RulePool
;
12
13
class
StaticFileTest
extends
\PHPUnit\Framework\TestCase
14
{
18
protected
$resolver
;
19
23
protected
$object
;
24
25
protected
function
setUp
()
26
{
27
$this->resolver = $this->createMock(
28
\
Magento
\Framework\View\Design\FileResolution\Fallback\ResolverInterface::class
29
);
30
$this->
object
=
new
StaticFile
($this->resolver);
31
}
32
33
public
function
testGetFile
()
34
{
35
$theme
= $this->getMockForAbstractClass(\
Magento
\Framework\View\Design\ThemeInterface::class);
36
$expected =
'some/file.ext'
;
37
$this->resolver->expects($this->once())
38
->method(
'resolve'
)
39
->with(
RulePool::TYPE_STATIC_FILE
,
'file.ext'
,
'frontend'
,
$theme
,
'en_US'
,
'Magento_Module'
)
40
->will($this->returnValue($expected));
41
$actual = $this->
object
->getFile(
'frontend'
,
$theme
,
'en_US'
,
'file.ext'
,
'Magento_Module'
);
42
$this->assertSame($expected, $actual);
43
}
44
}
Magento\Framework\View\Design\FileResolution\Fallback\StaticFile
Definition:
StaticFile.php:14
Magento\Framework\View\Design\Fallback\RulePool
Definition:
RulePool.php:18
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback\StaticFileTest\testGetFile
testGetFile()
Definition:
StaticFileTest.php:33
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback\StaticFileTest\$resolver
$resolver
Definition:
StaticFileTest.php:18
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback\StaticFileTest\$object
$object
Definition:
StaticFileTest.php:23
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback\StaticFileTest\setUp
setUp()
Definition:
StaticFileTest.php:25
Magento
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback\StaticFileTest
Definition:
StaticFileTest.php:13
$theme
$theme
Definition:
theme_rollback.php:9
Magento\Framework\View\Design\Fallback\RulePool\TYPE_STATIC_FILE
const TYPE_STATIC_FILE
Definition:
RulePool.php:26
Magento\Framework\View\Test\Unit\Design\FileResolution\Fallback
Definition:
FileTest.php:7