Page 1 of 1

phpunit bootstrap being stripped after update

PostPosted: December 21st, 2017, 6:20 pm
by emsmith
With the latest version of the extension ( 1.25.10474 ) any bootstrap= settings in phpunit.xml files are being stripped and not written to the phpunit.xml.tmp which is passed to the command line as the tests are run

Adding

Code: Select all
var_dump(file_get_contents('C:\xxx\tests\phpunit.xml.tmp'));
die;


to the top of a test and running it gives me

Code: Select all
[12/21/2017 1:17:13 PM Informational] string(478) "<?xml version="1.0"?>
[12/21/2017 1:17:13 PM Informational] <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" printerClass="PhpTestingPrinter" printerFile="C:\PROGRA~2\MIB055~1\2017\PROFES~1\COMMON7\IDE\EXTENS~1\G2ESZW0B.Z3U\PHPTES~2.PHP">
[12/21/2017 1:17:13 PM Informational]   <testsuites>
[12/21/2017 1:17:13 PM Informational]     <testsuite name="PhpTools_TestSuite">
[12/21/2017 1:17:13 PM Informational]       <file>C:\xxx\tests\Unit\AppTest.php</file>
[12/21/2017 1:17:13 PM Informational]     </testsuite>
[12/21/2017 1:17:13 PM Informational]   </testsuites>
[12/21/2017 1:17:13 PM Informational] </phpunit>"


which, as you can see, has dropped the bootstrap command from my initial xml file which looks like this

Code: Select all
<phpunit bootstrap="./devsense-bootstrap.php">
</phpunit>


and of course, without the bootstrap file... my tests do not run at all
so now unit testing is completely broken :(

Re: phpunit bootstrap being stripped after update

PostPosted: December 28th, 2017, 3:36 pm
by Miloslav Beno
Hello!

Thank you so much for bug report. We've identified the issue and we are preparing a fix to the next update.

I will be informing once it's out.

Thanks!

Re: phpunit bootstrap being stripped after update

PostPosted: January 16th, 2018, 10:29 am
by Miloslav Beno
Hello,

Please try the latest preview, this should work as expected https://www.devsense.com/download

Thank you,

Re: phpunit bootstrap being stripped after update

PostPosted: January 30th, 2018, 11:24 am
by mgnowak
The new release does not fix this problem for me.
I tried to install PHP.VS.1.25.10517.2017.vsix with Visual Studio 2017 v15.5.5.
It does not install without an internet connection - my employer uses a not internet connected network for development (only offline installations allowed).

Re: phpunit bootstrap being stripped after update

PostPosted: February 28th, 2018, 10:01 am
by maros.beno
For reference, discussion about the problem with offline installation continues here:
viewtopic.php?f=21&t=2106