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')); }
public function testProcessValueNotChanged() { $this->_indexerMock->expects($this->never())->method('invalidate'); $this->prepareIndexer(0); $this->_model->processValue(); }
/** * 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(); }
public function testHideMessage() { $this->indexerMock->expects($this->any())->method('getStatus')->with()->willReturn('Status other than "invalid"'); $this->assertFalse($this->model->isDisplayed()); }
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')); }