Example #1
0
 public function testAfterImportSource()
 {
     $this->_indexerMock->expects($this->once())->method('invalidate');
     $this->indexerRegistryMock->expects($this->once())->method('get')->with(\Magento\Catalog\Model\Indexer\Product\Price\Processor::INDEXER_ID)->will($this->returnValue($this->_indexerMock));
     $importMock = $this->getMock('Magento\\ImportExport\\Model\\Import', [], [], '', false);
     $this->assertEquals('return_value', $this->_model->afterImportSource($importMock, 'return_value'));
 }
Example #2
0
 public function testProcessValueNotChanged()
 {
     $this->_indexerMock->expects($this->never())->method('invalidate');
     $this->prepareIndexer(0);
     $this->_model->processValue();
 }
Example #3
0
 /**
  * Test mark indexer as invalid if disabled
  */
 public function testMarkDisabledIndexerAsInvalid()
 {
     $this->_stateMock->expects($this->once())->method('isFlatEnabled')->will($this->returnValue(false));
     $this->_indexerMock->expects($this->never())->method('invalidate');
     $this->_model->markIndexerAsInvalid();
 }
Example #4
0
 public function testHideMessage()
 {
     $this->indexerMock->expects($this->any())->method('getStatus')->with()->willReturn('Status other than "invalid"');
     $this->assertFalse($this->model->isDisplayed());
 }
Example #5
0
 public function testAfterImportSource()
 {
     $this->_indexerMock->expects($this->once())->method('invalidate');
     $importMock = $this->getMock('Magento\\ImportExport\\Model\\Import', array(), array(), '', false);
     $this->assertEquals('return_value', $this->_model->afterImportSource($importMock, 'return_value'));
 }