Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CatalogPriceRuleTest.php
Go to the documentation of this file.
1 <?php
7 
10 
11 class CatalogPriceRuleTest extends \PHPUnit\Framework\TestCase
12 {
16  protected $_model;
17 
21  protected $_quoteMock;
22 
26  protected $eventObserverMock;
27 
28  protected function setUp()
29  {
30  $this->eventObserverMock = $this->createMock(\Magento\Framework\Event\Observer::class);
31  $this->_quoteMock = $this->createMock(\Magento\Quote\Model\ResourceModel\Quote::class);
32  $this->_model = new CatalogPriceRule($this->_quoteMock);
33  }
34 
35  public function testDispatch()
36  {
37  $this->_quoteMock->expects($this->once())->method('markQuotesRecollectOnCatalogRules');
38  $this->_model->execute($this->eventObserverMock);
39  }
40 }