* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Tests\CacheClearer; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer; class ChainCacheClearerTest extends TestCase { protected static $cacheDir; public static function setUpBeforeClass() { self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_clearer_dir'); } public static function tearDownAfterClass() { @unlink(self::$cacheDir); } public function testInjectClearersInConstructor() { $clearer = $this->getMockClearer(); $clearer ->expects($this->once()) ->method('clear'); $chainClearer = new ChainCacheClearer(array($clearer)); $chainClearer->clear(self::$cacheDir); } /** * @group legacy */ public function testInjectClearerUsingAdd() { $clearer = $this->getMockClearer(); $clearer ->expects($this->once()) ->method('clear'); $chainClearer = new ChainCacheClearer(); $chainClearer->add($clearer); $chainClearer->clear(self::$cacheDir); } protected function getMockClearer() { return $this->getMockBuilder('Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface')->getMock(); } } __halt_compiler();----SIGNATURE:----j1vYiDEtyq1qg8xZWzFwcNtuIQ3MnEuGOJOs9w1KaOrYbYXZPTaAH4ayWtuySo1/ynmMMvMre17dOOC+7vwOB35WqRqc3Q8uL5oaChDDpbhLEJ3WoEfOPcfNGUDD9438EhAuzqdKeaV1IrBunJ+2xNJ83WxpDQ0jCxerEF5AMKHBY6dn1um8swURaD6fwwFQKwGbxfWyiK6KKnbpTYo6sijRIWf48kGP+XB5noIk+qFelXI3SKeg/7vWSQxJzL8n7eCZUx8/Yx+D5sh8MpBWz0r3oqjk4Tmj8AXHgyNzU48Kcj8kXE0CGK0yi3B9DZeQSuVvTc1GZs+e0p0FxvohxksmVoyVyafCbbJvYzhFibG+S7/osIh3yWPjVPh0zrqdiGxBlmhbGSxkzs7Uet3ckdgZOlYi+7Ga3RRPz5fQwwxdCylR0tapKNda9OTPmQPdCVjgAl3PA067nIxtlgmxObYREzI9yz8M3G97/UxlHCLVIrtB9ZeRtqAR4V01D7WEd114XlafYmQ8bmtOLN2aKNocc4iYA0uW35R+NwK9CC60Y2nwGmPnkPXLHcU7MvZAjlU8WTdvo0x9wIUvrux4dX7hD6bYCsRjTI3Mv/0PYiJHlRLo286lIHv36OWPl53MLGsCf1q0GBP4KFEX3XB8xUMzPkwU1VNBh9joz9uOoeg=----ATTACHMENT:----NTM5MTk5NDU5OTc2NDIzMSAzMTUzMjE5OTAzNTUwNjg1IDI2NDE5MjI0Njg5NDc2NjY=