Merge branch '3.4' into 4.4
* 3.4: [CI] Silence errors when remove file/dir on test tearDown()
This commit is contained in:
commit
9982713327
@ -142,7 +142,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,9 +168,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(): void
|
protected function tearDown(): void
|
||||||
{
|
{
|
||||||
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(): void
|
protected function tearDown(): void
|
||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,9 +168,9 @@ class FileBagTest extends TestCase
|
|||||||
protected function tearDown(): void
|
protected function tearDown(): void
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
@ -129,11 +129,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