Closed myself379 closed 5 years ago
For now, I just use a different name instead of @group integration. Perhaps I'll close this topic as there is no reproducibility.
The exclude-group
should work.
For example given the test:
class GroupTest extends \PHPUnit\Framework\TestCase
{
public function testGroup1()
{
$this->assertTrue(true);
}
/**
* @group hello
*/
public function testExcludeGroupHello()
{
$this->assertTrue(true);
}
}
Running the following on the command-line with exclude the test annotated with @group hello
:
$ vendor/bin/phpunit --testdox --exclude-group hello
You can set as a global option in Sublime:
Configure settings via Menu > Preferences > Settings
or by the Command Palette. To use the command palette:
Ctrl+Shift+P
Enter
"phpunit.options":
{
"no-coverage": true,
"exclude-group": "hello"
},
If you also turn on the debug option:
"phpunit.debug": true
And then view the console when you run test (Menu > View > Show Console), you should see the command that is run, for example:
Running /path/to/sublime-phpunit-testing/vendor/bin/phpunit --no-coverage --exclude-group hello test/GroupTest.php
In the case above, the "hello" group should be ignored.
Hi,
I run into this issue when I tried to annotate a test function with @group integration, I still wants to run it via phpunit_test_nearest but even with
The test is still not run. How can I force to run and ignore @group for this phpunit package?