10 public function testCleanCache()
12 $cacheBackendMock = $this->getMockForAbstractClass(\Zend_Cache_Backend_Interface::class);
13 $cacheFrontendMock = $this->getMockForAbstractClass(\
Magento\Framework\Cache\FrontendInterface::class);
14 $frontendPoolMock = $this->createMock(\
Magento\Framework\
App\Cache\Frontend\Pool::class);
16 $cacheBackendMock->expects(
25 $cacheFrontendMock->expects(
30 $this->returnValue($cacheBackendMock)
33 $frontendPoolMock->expects(
38 $this->onConsecutiveCalls(
true,
false)
41 $frontendPoolMock->expects(
46 $this->returnValue($cacheFrontendMock)
49 $objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
53 $model = $objectManagerHelper->getObject(
54 \
Magento\Backend\Cron\CleanCache::class,
56 'cacheFrontendPool' => $frontendPoolMock,