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
Setup
Test
Unit
Patch
PatchFactoryTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Setup\Test\Unit\Patch
;
8
9
use
Magento\Framework\App\ResourceConnection
;
10
use
Magento\Framework\DB\Adapter\AdapterInterface
;
11
use
Magento\Framework\ObjectManagerInterface
;
12
use
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
;
13
use
Magento\Framework\Setup\Patch\PatchFactory
;
14
use
Magento\Framework\Setup\Patch\PatchHistory
;
15
use
Magento\Framework\Setup\Patch\PatchInterface
;
16
21
class
PatchFactoryTest
extends
\PHPUnit\Framework\TestCase
22
{
26
private
$patchFactory;
27
31
private
$objectManagerMock;
32
33
protected
function
setUp
()
34
{
35
$objectManager
=
new
ObjectManager
($this);
36
$this->objectManagerMock = $this->createMock(ObjectManagerInterface::class);
37
$this->patchFactory =
$objectManager
->getObject(
38
PatchFactory::class,
39
[
40
'objectManager'
=> $this->objectManagerMock,
41
]
42
);
43
}
44
49
public
function
testCreateNonPatchInterface
()
50
{
51
$patchNonPatchInterface = $this->createMock(\stdClass::class);
52
$this->objectManagerMock->expects($this->any())
53
->method(
'create'
)
54
->with(
'\\stdClass'
)
55
->willReturn($patchNonPatchInterface);
56
57
$this->patchFactory->create(\stdClass::class);
58
}
59
}
Magento\Framework\Setup\Test\Unit\Patch\PatchFactoryTest\testCreateNonPatchInterface
testCreateNonPatchInterface()
Definition:
PatchFactoryTest.php:49
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\Setup\Patch\PatchInterface
Definition:
PatchInterface.php:11
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\Setup\Test\Unit\Patch
Definition:
PatchApplierTest.php:7
Magento\Framework\Setup\Test\Unit\Patch\PatchFactoryTest\setUp
setUp()
Definition:
PatchFactoryTest.php:33
Magento\Framework\DB\Adapter\AdapterInterface
Definition:
AdapterInterface.php:16
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
Definition:
ObjectManager.php:13
Magento\Framework\Setup\Test\Unit\Patch\PatchFactoryTest
Definition:
PatchFactoryTest.php:21
Magento\Framework\App\ResourceConnection
Magento\Framework\Setup\Patch\PatchFactory
Definition:
PatchFactory.php:15
Magento\Framework\Setup\Patch\PatchHistory
Definition:
PatchHistory.php:14