Closed joanhey closed 1 year ago
@joanhey
Please use realpath
,
realpath(sys_get_temp_dir())
should return actual paths.
Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/6077310018/workflow
I changed in Pest test the toStartWith()
with toBeFile()
and worked without problems.
But I will test the realpath()
to test it also.
Yes, is working withrealpath()
.
https://github.com/joanhey/AdapterMan/actions/runs/6077354164/job/16486891097
Thank You !!!
Describe the bug Testing with Pest, that a temp file exist. First we create the temp file:
Later we check that the file exist in the temp file, as the file name is random, we test that the path start with the temp dir:
Tried to read symlinks, but also fail.
For create the file and test, we use in both
sys_get_temp_dir()
.I read about in: https://github.com/actions/runner-images/issues/712 https://github.com/actions/toolkit/issues/518
But without a way to fix it.
Windows:
MacOS:
Any help will be appreciated.
Version
v1
orv2
.v2
v1
Runners
Operating systems Ubuntu OK MacOS and Windows fail
PHP versions 8.1, 8.2, 8.3
To Reproduce
.yml
fileExpected behavior That the tmp dir is the same to test it.
Screenshots/Logs With Ubuntu is OK.
MacOS
Windows
Additional context Check in win-mac branch: https://github.com/joanhey/AdapterMan/tree/win-mac
Are you willing to submit a PR?