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
Block
Adminhtml
Product
Edit
Button
BackTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Button
;
7
8
use
Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Back
;
9
13
class
BackTest
extends
GenericTest
14
{
15
public
function
testGetButtonData
()
16
{
17
$this->contextMock->expects($this->once())
18
->method(
'getUrl'
)
19
->with(
'*/*/'
, [])
20
->willReturn(
'/'
);
21
22
$this->assertEquals(
23
[
24
'label'
=>
__
(
'Back'
),
25
'on_click'
=> sprintf(
"location.href = '%s';"
,
'/'
),
26
'class'
=>
'back'
,
27
'sort_order'
=> 10
28
],
29
$this->
getModel
(Back::class)->getButtonData()
30
);
31
}
32
}
Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Button\GenericTest\getModel
getModel($class=Generic::class)
Definition:
GenericTest.php:62
Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Button\BackTest\testGetButtonData
testGetButtonData()
Definition:
BackTest.php:15
__
__()
Definition:
__.php:13
Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Back
Definition:
Back.php:11
Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Button\BackTest
Definition:
BackTest.php:13
Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Button
Definition:
AddAttributeTest.php:6
Magento\Catalog\Test\Unit\Block\Adminhtml\Product\Edit\Button\GenericTest
Definition:
GenericTest.php:17