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-rule
Test
Unit
Cron
DailyCatalogUpdateTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CatalogRule\Test\Unit\Cron
;
8
9
use
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
;
10
11
class
DailyCatalogUpdateTest
extends
\PHPUnit\Framework\TestCase
12
{
18
protected
$ruleProductProcessor
;
19
25
protected
$cron
;
26
27
protected
function
setUp
()
28
{
29
$this->ruleProductProcessor = $this->createMock(
30
\
Magento
\CatalogRule\Model\Indexer\Rule\RuleProductProcessor::class
31
);
32
33
$this->cron = (
new
ObjectManager
($this))->getObject(
34
\
Magento
\CatalogRule\Cron\DailyCatalogUpdate::class,
35
[
36
'ruleProductProcessor'
=> $this->ruleProductProcessor,
37
]
38
);
39
}
40
41
public
function
testDailyCatalogUpdate
()
42
{
43
$this->ruleProductProcessor->expects($this->once())->method(
'markIndexerAsInvalid'
);
44
45
$this->cron->execute();
46
}
47
}
Magento\CatalogRule\Test\Unit\Cron\DailyCatalogUpdateTest\setUp
setUp()
Definition:
DailyCatalogUpdateTest.php:27
Magento\CatalogRule\Test\Unit\Cron\DailyCatalogUpdateTest\$ruleProductProcessor
$ruleProductProcessor
Definition:
DailyCatalogUpdateTest.php:18
Magento\CatalogRule\Test\Unit\Cron\DailyCatalogUpdateTest
Definition:
DailyCatalogUpdateTest.php:11
Magento\CatalogRule\Test\Unit\Cron\DailyCatalogUpdateTest\$cron
$cron
Definition:
DailyCatalogUpdateTest.php:25
Magento\CatalogRule\Test\Unit\Cron
Definition:
DailyCatalogUpdateTest.php:7
Magento
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
Definition:
ObjectManager.php:13
Magento\CatalogRule\Test\Unit\Cron\DailyCatalogUpdateTest\testDailyCatalogUpdate
testDailyCatalogUpdate()
Definition:
DailyCatalogUpdateTest.php:41