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
ObjectManager
Test
Unit
Config
Reader
DomFactoryTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\ObjectManager\Test\Unit\Config\Reader
;
8
9
use \Magento\Framework\ObjectManager\Config\Reader\DomFactory;
10
11
class
DomFactoryTest
extends
\PHPUnit\Framework\TestCase
12
{
16
protected
$_factory
;
17
21
protected
$_object
;
22
26
protected
$_objectManager
;
27
28
protected
function
setUp
()
29
{
30
$this->_object = $this->createMock(\
Magento
\Framework\
ObjectManager
\
Config
\Reader\Dom::class);
31
$this->_objectManager =
32
$this->createPartialMock(\
Magento
\Framework\
ObjectManager
\ObjectManager::class, [
'create'
]);
33
$this->_factory =
new
DomFactory
($this->_objectManager);
34
}
35
36
public
function
testCreate
()
37
{
38
$this->_objectManager->expects($this->once())
39
->method(
'create'
)
40
->with(\
Magento
\Framework\
ObjectManager
\
Config
\Reader\Dom::class)
41
->will($this->returnValue($this->_object));
42
43
$this->_factory->create([1]);
44
}
45
}
Magento\Framework\ObjectManager\Test\Unit\Config\Reader\DomFactoryTest\$_objectManager
$_objectManager
Definition:
DomFactoryTest.php:26
Magento\Framework\ObjectManager\Test\Unit\Config\Reader\DomFactoryTest\$_factory
$_factory
Definition:
DomFactoryTest.php:16
Magento\Framework\ObjectManager\Test\Unit\Config\Reader\DomFactoryTest\$_object
$_object
Definition:
DomFactoryTest.php:21
Magento\Framework\ObjectManager\ObjectManager
Definition:
ObjectManager.php:15
Magento\Framework\ObjectManager\Test\Unit\Config\Reader\DomFactoryTest\testCreate
testCreate()
Definition:
DomFactoryTest.php:36
Magento\Framework\ObjectManager\Config\Config
Definition:
Config.php:13
Magento\Framework\ObjectManager\Test\Unit\Config\Reader\DomFactoryTest\setUp
setUp()
Definition:
DomFactoryTest.php:28
Magento
Magento\Framework\ObjectManager\Test\Unit\Config\Reader
Definition:
DomFactoryTest.php:7
Magento\Framework\ObjectManager\Config\Reader\DomFactory
Definition:
DomFactory.php:13
Magento\Framework\ObjectManager\Test\Unit\Config\Reader\DomFactoryTest
Definition:
DomFactoryTest.php:11