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
Model
ResourceModel
Rule
DateApplierTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\SalesRule\Test\Unit\Model\ResourceModel\Rule
;
7
8
use
Magento\SalesRule\Model\ResourceModel\Rule\DateApplier
;
9
13
class
DateApplierTest
extends
\PHPUnit\Framework\TestCase
14
{
18
protected
$model
;
19
23
protected
$objectManager
;
24
28
protected
function
setUp
()
29
{
30
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
31
32
$this->model = $this->objectManager->getObject(
33
\
Magento
\SalesRule\Model\
ResourceModel
\
Rule
\DateApplier::class,
34
[]
35
);
36
}
37
41
public
function
testApplyDate()
42
{
43
$className
= \Magento\Framework\DB\Select::class;
45
$select
= $this->createMock(
$className
);
46
47
$select
->expects($this->exactly(2))
48
->method(
'where'
)
49
->willReturnSelf();
50
51
$now = date(
'Y-m-d'
);
52
53
$this->model->applyDate(
$select
, $now);
54
}
55
}
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
Magento\SalesRule\Test\Unit\Model\ResourceModel\Rule\DateApplierTest\setUp
setUp()
Definition:
DateApplierTest.php:28
Magento\SalesRule\Test\Unit\Model\ResourceModel\Rule\DateApplierTest\$objectManager
$objectManager
Definition:
DateApplierTest.php:23
Magento
Magento\SalesRule\Test\Unit\Model\ResourceModel\Rule
Definition:
DateApplierTest.php:6
Magento\SalesRule\Model\ResourceModel\Rule
Definition:
Rule.php:20
Magento\SalesRule\Test\Unit\Model\ResourceModel\Rule\DateApplierTest\$model
$model
Definition:
DateApplierTest.php:18
Magento\SalesRule\Test\Unit\Model\ResourceModel\Rule\DateApplierTest
Definition:
DateApplierTest.php:13
Magento\SalesRule\Model\ResourceModel\Rule\DateApplier
Definition:
DateApplier.php:12
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31