I have a custom Drupal 8 module for which I'm trying to create unit tests by following the instructions at https://www.drupal.org/phpunit.
The path of my module is: /modules/custom/dev_module
The path of my tests is: /modules/custom/dev_module/tests/src/Unit
More specifically, in the Unit
folder I have a DummyTest.php
file with the following code:
<?php
namespace Drupal\dev_module\Tests;
use Drupal\Tests\UnitTestCase;
/**
* My dummy test.
*
* @group dummy_test
*/
class DummyTest extends UnitTestCase {
public function testDummy() {
$this->assertEquals(5, 5);
}
}
When executing the following commands from the terminal (I'm on Mac OS):
> cd core
> ../vendor/bin/phpunit --list-groups
My group dummy_test
doesn't show up in the listed groups. Any idea why?