I'm running the tests on a Vagrant provisioned VirtualBox with CentOS as the guest and Windows as the host OS using a vboxsf mounted file system.
With Codeception 2.1 it worked but with Codeception 2.2 I get a protocol error.
For me it looks like it's caused be the : in the filename like MyTestCest:myTestMethod.fail.html because the : is invalid for Windows filenames.
In Codeception 2.1 filenames looked like MyTestCest.myTestMethod.fail.html (. instead of :)
I can run the test successfully when I write the results to a directory inside the VM that's not mounted/mapped with/to Windows.
This bug seems to be related to the function _failed in \Codeception\Lib\InnerBrowser because changing line 61 from
$this->_savePageSource(codecept_output_dir().str_replace(['::', '\\', '/'], ['.', '.', '.'], Descriptor::getTestSignature($test)) . '.fail.html');
to
$this->_savePageSource(codecept_output_dir().str_replace([':', '\\', '/'], ['.', '.', '.'], Descriptor::getTestSignature($test)) . '.fail.html');
fixes the problem for me.
But I'm not sure if this is the wanted behavior
sorry what are the difference between those 2 lines?
It's the double :: vs : as the first value of the first argument to str_replace
@DavertMik
I will close this issue because fix for #3207 will also be valid for this.
Thanks
Most helpful comment
This bug seems to be related to the function
_failedin\Codeception\Lib\InnerBrowserbecause changing line61fromto
fixes the problem for me.
But I'm not sure if this is the wanted behavior