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-catalog
Test
Unit
Controller
Adminhtml
Product
Initialization
Helper
Plugin
Handler
CompositeTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler
;
7
8
use
Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler\Composite
;
9
10
class
CompositeTest
extends
\PHPUnit\Framework\TestCase
11
{
12
public
function
testHandle
()
13
{
14
$factoryMock = $this->createMock(
15
\
Magento
\Catalog\Controller\Adminhtml\
Product
\Initialization\
Helper
\HandlerFactory::class
16
);
17
18
$constructorMock = $this->createMock(
19
\
Magento
\Catalog\Controller\Adminhtml\
Product
\Initialization\
Helper
\HandlerInterface::class
20
);
21
22
$factoryMock->expects(
23
$this->exactly(2)
24
)->method(
25
'create'
26
)->with(
27
'handlerInstance'
28
)->will(
29
$this->returnValue($constructorMock)
30
);
31
32
$productMock = $this->createMock(\
Magento
\Catalog\Model\Product::class);
33
34
$constructorMock->expects($this->exactly(2))->method(
'handle'
)->with($productMock);
35
36
$model
=
new
Composite
($factoryMock, [
'handlerInstance'
,
'handlerInstance'
]);
37
38
$model
->handle($productMock);
39
}
40
}
Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper
Definition:
Helper.php:26
$model
$model
Definition:
enable_catalog_product_reindex_schedule.php:9
Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler\Composite
Definition:
Composite.php:12
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler\CompositeTest
Definition:
CompositeTest.php:10
Magento
Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler
Definition:
CompositeTest.php:6
Magento\Catalog\Test\Unit\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler\CompositeTest\testHandle
testHandle()
Definition:
CompositeTest.php:12