[CI] Silence errors when remove file/dir on test tearDown()
This commit is contained in:
parent
84887f20e6
commit
efef41faa1
@ -120,7 +120,7 @@ class LintCommandTest extends TestCase
|
|||||||
{
|
{
|
||||||
foreach ($this->files as $file) {
|
foreach ($this->files as $file) {
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
unlink($file);
|
@unlink($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,9 +174,9 @@ EOF;
|
|||||||
{
|
{
|
||||||
foreach ($this->files as $file) {
|
foreach ($this->files as $file) {
|
||||||
if (file_exists($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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class ConfigCacheTest extends TestCase
|
|||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
unlink($file);
|
@unlink($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class FileExistenceResourceTest extends TestCase
|
|||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
if (file_exists($this->file)) {
|
if (file_exists($this->file)) {
|
||||||
unlink($this->file);
|
@unlink($this->file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,11 +30,9 @@ class FileResourceTest extends TestCase
|
|||||||
|
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
if (!file_exists($this->file)) {
|
if (file_exists($this->file)) {
|
||||||
return;
|
@unlink($this->file);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink($this->file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetResource()
|
public function testGetResource()
|
||||||
|
@ -31,7 +31,7 @@ class ResourceCheckerConfigCacheTest extends TestCase
|
|||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
unlink($file);
|
@unlink($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,11 +103,9 @@ class AutowireServiceResourceTest extends TestCase
|
|||||||
|
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
if (!file_exists($this->file)) {
|
if (file_exists($this->file)) {
|
||||||
return;
|
@unlink($this->file);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink($this->file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getStaleFileTime()
|
private function getStaleFileTime()
|
||||||
|
@ -165,9 +165,9 @@ class FileBagTest extends TestCase
|
|||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) {
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class MockFileSessionStorageTest extends TestCase
|
|||||||
{
|
{
|
||||||
array_map('unlink', glob($this->sessionDir.'/*'));
|
array_map('unlink', glob($this->sessionDir.'/*'));
|
||||||
if (is_dir($this->sessionDir)) {
|
if (is_dir($this->sessionDir)) {
|
||||||
rmdir($this->sessionDir);
|
@rmdir($this->sessionDir);
|
||||||
}
|
}
|
||||||
$this->sessionDir = null;
|
$this->sessionDir = null;
|
||||||
$this->storage = null;
|
$this->storage = null;
|
||||||
|
@ -47,7 +47,7 @@ class NativeSessionStorageTest extends TestCase
|
|||||||
session_write_close();
|
session_write_close();
|
||||||
array_map('unlink', glob($this->savePath.'/*'));
|
array_map('unlink', glob($this->savePath.'/*'));
|
||||||
if (is_dir($this->savePath)) {
|
if (is_dir($this->savePath)) {
|
||||||
rmdir($this->savePath);
|
@rmdir($this->savePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->savePath = null;
|
$this->savePath = null;
|
||||||
|
@ -43,7 +43,7 @@ class PhpBridgeSessionStorageTest extends TestCase
|
|||||||
session_write_close();
|
session_write_close();
|
||||||
array_map('unlink', glob($this->savePath.'/*'));
|
array_map('unlink', glob($this->savePath.'/*'));
|
||||||
if (is_dir($this->savePath)) {
|
if (is_dir($this->savePath)) {
|
||||||
rmdir($this->savePath);
|
@rmdir($this->savePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->savePath = null;
|
$this->savePath = null;
|
||||||
|
@ -45,7 +45,7 @@ abstract class FileValidatorTest extends ConstraintValidatorTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists($this->path)) {
|
if (file_exists($this->path)) {
|
||||||
unlink($this->path);
|
@unlink($this->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->path = null;
|
$this->path = null;
|
||||||
|
@ -123,11 +123,11 @@ YAML;
|
|||||||
{
|
{
|
||||||
foreach ($this->files as $file) {
|
foreach ($this->files as $file) {
|
||||||
if (file_exists($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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user