We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d4c11e commit f160cc4Copy full SHA for f160cc4
Tests/Field/FileFormFieldTest.php
@@ -71,9 +71,16 @@ public function testSetValue($method)
71
$field->$method(__DIR__.'/../Fixtures/no-extension');
72
$value = $field->getValue();
73
74
+ $tmpName = $value['tmp_name'];
75
+
76
+ // Windows creates temporary files with a .tmp extension
77
+ if ('\\' === \DIRECTORY_SEPARATOR && str_ends_with($tmpName, '.tmp')) {
78
+ $tmpName = substr($tmpName, 0, -4);
79
+ }
80
81
$this->assertArrayNotHasKey(
82
'extension',
- pathinfo($value['tmp_name']),
83
+ pathinfo($tmpName),
84
"->$method() does not add a file extension in the tmp_name copy"
85
);
86
}
0 commit comments