diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php index 5f74f1f889..2c25b8e9f2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php @@ -19,6 +19,7 @@ use Symfony\Component\Config\Resource\ResourceInterface; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; @@ -38,13 +39,14 @@ class CacheClearCommandTest extends TestCase protected function tearDown(): void { - $this->fs->remove($this->kernel->getProjectDir()); + try { + $this->fs->remove($this->kernel->getProjectDir()); + } catch (IOException $e) { + } } public function testCacheIsFreshAfterCacheClearedWithWarmup() { - $this->fs->mkdir($this->kernel->getProjectDir()); - $input = new ArrayInput(['cache:clear']); $application = new Application($this->kernel); $application->setCatchExceptions(false);