Skip to content

Commit

Permalink
[CI] Silence errors when remove file/dir on test tearDown()
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Oct 14, 2020
1 parent dbe9a3f commit d18c26c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Tests/FileBagTest.php
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Tests/Session/Storage/MockFileSessionStorageTest.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Session/Storage/NativeSessionStorageTest.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Session/Storage/PhpBridgeSessionStorageTest.php
Expand Up @@ -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;
Expand Down

0 comments on commit d18c26c

Please sign in to comment.