/** * @param bool $fixtureResultOne * @param bool $fixtureResultTwo * @param bool $expectedResult * @dataProvider cleanModeMatchingAnyTagDataProvider */ public function testCleanModeMatchingAnyTag($fixtureResultOne, $fixtureResultTwo, $expectedResult) { $this->_frontend->expects($this->at(0))->method('clean')->with(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, ['test_tag_one', 'enforced_tag'])->will($this->returnValue($fixtureResultOne)); $this->_frontend->expects($this->at(1))->method('clean')->with(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, ['test_tag_two', 'enforced_tag'])->will($this->returnValue($fixtureResultTwo)); $actualResult = $this->_object->clean(\Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, ['test_tag_one', 'test_tag_two']); $this->assertEquals($expectedResult, $actualResult); }
/** * {@inheritdoc} * * @param string $mode * @param array $tags * @return bool */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) { $this->eventManager->dispatch('adminhtml_cache_refresh_type'); return parent::clean($mode, $tags); }