diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php index 166f1d9c446b2..f03e87a4a8100 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -120,7 +120,7 @@ protected function tearDown() { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php index ba883543cadb0..3c88dc0a6637d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php @@ -174,9 +174,9 @@ protected function tearDown() { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/yml-lint-test'); + @rmdir(sys_get_temp_dir().'/yml-lint-test'); } } diff --git a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php index d0b70899b513a..95a5881733967 100644 --- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php @@ -30,7 +30,7 @@ protected function tearDown() foreach ($files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php index 433f65e8203db..ff7fc7b5a3a12 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php @@ -30,7 +30,7 @@ protected function setUp() protected function tearDown() { if (file_exists($this->file)) { - unlink($this->file); + @unlink($this->file); } } diff --git a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php index 5b789700ad8c9..a84faa956cb22 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php @@ -30,11 +30,9 @@ protected function setUp() protected function tearDown() { - if (!file_exists($this->file)) { - return; + if (file_exists($this->file)) { + @unlink($this->file); } - - unlink($this->file); } public function testGetResource() diff --git a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php index a2c2eeb811b20..9be53196f4c5a 100644 --- a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php @@ -31,7 +31,7 @@ protected function tearDown() foreach ($files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php b/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php index 990a9ad6639b3..325155076286e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Config/AutowireServiceResourceTest.php @@ -103,11 +103,9 @@ public function testNotFreshIfClassNotFound() protected function tearDown() { - if (!file_exists($this->file)) { - return; + if (file_exists($this->file)) { + @unlink($this->file); } - - unlink($this->file); } private function getStaleFileTime() diff --git a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php index 8eaf168a2d686..5415dfb078d82 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -165,9 +165,9 @@ protected function setUp() protected function tearDown() { foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) { - unlink($file); + @unlink($file); } - rmdir(sys_get_temp_dir().'/form_test'); + @rmdir(sys_get_temp_dir().'/form_test'); } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php index d6bd1823f4a71..73d154587a5ed 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -43,7 +43,7 @@ protected function tearDown() { array_map('unlink', glob($this->sessionDir.'/*')); if (is_dir($this->sessionDir)) { - rmdir($this->sessionDir); + @rmdir($this->sessionDir); } $this->sessionDir = null; $this->storage = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 7cfcd223e0323..d86f56ebda092 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -47,7 +47,7 @@ protected function tearDown() session_write_close(); array_map('unlink', glob($this->savePath.'/*')); if (is_dir($this->savePath)) { - rmdir($this->savePath); + @rmdir($this->savePath); } $this->savePath = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index 700764840d75e..e60b91b13cbc9 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -43,7 +43,7 @@ protected function tearDown() session_write_close(); array_map('unlink', glob($this->savePath.'/*')); if (is_dir($this->savePath)) { - rmdir($this->savePath); + @rmdir($this->savePath); } $this->savePath = null; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index ae2f2b53a8d78..89a9941182eca 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -45,7 +45,7 @@ protected function tearDown() } if (file_exists($this->path)) { - unlink($this->path); + @unlink($this->path); } $this->path = null; diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index d19185f16615a..98c63b627cf33 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -123,11 +123,11 @@ protected function tearDown() { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); + @rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); } }