Skip to content

Commit d18c26c

Browse files
committed
[CI] Silence errors when remove file/dir on test tearDown()
1 parent dbe9a3f commit d18c26c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Tests/FileBagTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ protected function setUp()
165165
protected function tearDown()
166166
{
167167
foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) {
168-
unlink($file);
168+
@unlink($file);
169169
}
170170

171-
rmdir(sys_get_temp_dir().'/form_test');
171+
@rmdir(sys_get_temp_dir().'/form_test');
172172
}
173173
}

Tests/Session/Storage/MockFileSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function tearDown()
4343
{
4444
array_map('unlink', glob($this->sessionDir.'/*'));
4545
if (is_dir($this->sessionDir)) {
46-
rmdir($this->sessionDir);
46+
@rmdir($this->sessionDir);
4747
}
4848
$this->sessionDir = null;
4949
$this->storage = null;

Tests/Session/Storage/NativeSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function tearDown()
4747
session_write_close();
4848
array_map('unlink', glob($this->savePath.'/*'));
4949
if (is_dir($this->savePath)) {
50-
rmdir($this->savePath);
50+
@rmdir($this->savePath);
5151
}
5252

5353
$this->savePath = null;

Tests/Session/Storage/PhpBridgeSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function tearDown()
4343
session_write_close();
4444
array_map('unlink', glob($this->savePath.'/*'));
4545
if (is_dir($this->savePath)) {
46-
rmdir($this->savePath);
46+
@rmdir($this->savePath);
4747
}
4848

4949
$this->savePath = null;

0 commit comments

Comments
 (0)