Closed rodber closed 4 years ago
This might be a bit of a duplicate of: https://github.com/recca0120/vscode-phpunit/issues/63
This might be a bit of a duplicate of: #63
I don't think that is a dupe. I'm not getting the "duplicated ID" message and in fact, the issue is on 2.0.74
as downgrading to 2.0.73
fixes the issue for me.
So, no dupe.
I had the same issue, but I had to downgrade back to 2.0.72 cause 2.0.73 still didn't work. @rodolfoberrios can you confirm if you downgraded to .72 as well instead of .73?
I'ts very odd in my case as both 2.0.73
and 2.0.72
works fine for me. 2.0.74
breaks the single testing (never had the dupe thing).
I tested with combinations of this:
{test,tests,Test,Tests}/**/*Test.php
Most likely there's a mixed issue here affecting certain file-systems.
I'm using Ubuntu 20.04.
It looks as though the regex of /^.*::testCallAndRequestIsAjax.*$/
isn't working to identify the test (unrelated(?) to the case sensitivity)
Can you try run:
./bin/phpunit -c /home/rodolfo/git/recca/laravel-terminal/phpunit.xml.dist --filter '/^.*::testCallAndRequestIsAjax.*$/' /home/rodolfo/git/recca/laravel-terminal/tests/ApplicationTest.php
See if it does the same thing
Re #63 - this becoming this issue - but I think closing it because it was due to duplicate IDs is sorted and this ticket contains great info on the issue at hand.
Looking PhpUnit.log I have noticed that around July 30, 2020, the 3rd parameter (value of --filter) became decorated with "'". I tried it on a command line and after removing "'", PhpUnit executed tests. With "'" around the expression, I just got "No tests executed!". I am using Windows.
Example (PhpUnit.log): Before July 30:
{
title: 'PHPUnit LSP',
command: '...\\php.exe',
arguments: [
'...\\phpunit',
'--filter',
'^.*::(testRenderEmail)( with data set .*)?$',
'...SomePhpFile.php'
]
}
After July 30:
{
title: 'PHPUnit LSP',
command: 'c:\\wamp64\\bin\\php\\php7.2.10\\php.exe',
arguments: [
'...\\phpunit',
'--filter',
"'/^.*::testGetUrlHost.*$/'",
'...SomePhpFile.php'
]
}
I'm having the same problem. For whatever reason, I can run full files of tests but running individual tests does not work. I'm having this problem on OpenSuse Tumbleweed. Mentioning the OS since others seem to think it might be related to specific filesystems.
As others mentioned, reverting the extension to version 2.0.73 solves the issue so that's what I've done for now.
Same here. Single tests stop running after version 2.0.73
It looks as though the regex of
/^.*::testCallAndRequestIsAjax.*$/
isn't working to identify the test (unrelated(?) to the case sensitivity)Can you try run:
./bin/phpunit -c /home/rodolfo/git/recca/laravel-terminal/phpunit.xml.dist --filter '/^.*::testCallAndRequestIsAjax.*$/' /home/rodolfo/git/recca/laravel-terminal/tests/ApplicationTest.php
See if it does the same thing
Re #63 - this becoming this issue - but I think closing it because it was due to duplicate IDs is sorted and this ticket contains great info on the issue at hand.
I got the following (using vendor phpunit):
❯ vendor/bin/phpunit -c phpunit.xml.dist --filter '/^.*::testCallAndRequestIsAjax.*$/' tests/ApplicationTest.php
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.6 with Xdebug 2.9.3
Configuration: /home/rodolfo/git/laravel-terminal/phpunit.xml.dist
. 1 / 1 (100%)
Time: 353 ms, Memory: 8.00 MB
OK (1 test, 5 assertions)
Generating code coverage report in Clover XML format ... done [72 ms]
Generating code coverage report in HTML format ... done [58 ms]
As @hanak mentions, I've the same extra quotes under 2.0.74
. It doesn't seem to be related to the actual regex, just the quotes.
Same here. Single tests not being executed. Downgrading to 2.0.72 worked.
Downgraded to 2.0.72 but still gives me "No tests executed!" when running a singular test.
I have same issue and resolved after setting phpunit.shell
"phpunit.shell": "zsh"
Suggestion for @musingfox worked for me as well. I'd downgraded versions to fix the problem. I just tested upgrading again and confirmed I still had the issue. Then I added that for my setting and now it works again.
Am wondering if maybe this was only a problem for zsh users then?
I was able to use bash
instead and it worked. I'm using this extension in a remote dev container as well.
"phpunit.shell": "bash"
Not working on 2.0.75
for me too. Single tests not being executed. Downgrading to 2.0.72
worked.
OS: Win10
VSCode: 1.49.0
Shell: PowerShell Core 7.0.3
PHP: 7.3.18
PHPUnit: 9.3.10
Confirming issue fixed after update to 2.0.76
. 🎉
Thank you for the update.
I've found that it is unable to run individual tests by using the "Run" button shown in codelens or in the test explorer sidebar.
I've tested with a couple of repos, for example, your Laravel terminal:
Same with Slim Framework:
I also tried with PHPUnit 9 and it is the same result.