public function testClearByTags() { $tags = array('foo', 'bar'); $storageMock = \Mockery::mock('Zend\\Cache\\Storage\\TaggableInterface')->shouldReceive('clearByTags')->with(array('strokercache_foo', 'strokercache_bar'), null)->getMock(); $this->cacheService->setCacheStorage($storageMock); $this->cacheService->clearByTags($tags); }