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-sales-rule
Test
Unit
Block
Adminhtml
Promo
Quote
Edit
SaveAndContinueButtonTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit
;
7
8
use
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
;
9
10
class
SaveAndContinueButtonTest
extends
\PHPUnit\Framework\TestCase
11
{
15
protected
$model
;
16
20
protected
$urlBuilderMock
;
21
25
protected
$registryMock
;
26
27
protected
function
setUp
()
28
{
29
$this->urlBuilderMock = $this->createMock(\
Magento
\Framework\UrlInterface::class);
30
$this->registryMock = $this->createMock(\
Magento
\Framework\Registry::class);
31
$contextMock = $this->createMock(\
Magento
\Backend\Block\Widget\Context::class);
32
33
$contextMock->expects($this->once())->method(
'getUrlBuilder'
)->willReturn($this->urlBuilderMock);
34
35
$this->model = (
new
ObjectManager
($this))->getObject(
36
\
Magento
\SalesRule\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButton::class,
37
[
38
'context'
=> $contextMock,
39
'registry'
=> $this->registryMock
40
]
41
);
42
}
43
44
public
function
testGetButtonData
()
45
{
46
$data
= [
47
'label'
=>
__
(
'Save and Continue Edit'
),
48
'class'
=>
'save'
,
49
'on_click'
=>
''
,
50
'sort_order'
=> 90,
51
];
52
53
$this->assertEquals(
$data
, $this->model->getButtonData());
54
}
55
}
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButtonTest\$model
$model
Definition:
SaveAndContinueButtonTest.php:15
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit
Definition:
DeleteButtonTest.php:6
__
__()
Definition:
__.php:13
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButtonTest\$urlBuilderMock
$urlBuilderMock
Definition:
SaveAndContinueButtonTest.php:20
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
Definition:
ObjectManager.php:13
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButtonTest\$registryMock
$registryMock
Definition:
SaveAndContinueButtonTest.php:25
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButtonTest\testGetButtonData
testGetButtonData()
Definition:
SaveAndContinueButtonTest.php:44
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButtonTest\setUp
setUp()
Definition:
SaveAndContinueButtonTest.php:27
Magento\SalesRule\Test\Unit\Block\Adminhtml\Promo\Quote\Edit\SaveAndContinueButtonTest
Definition:
SaveAndContinueButtonTest.php:10