Automated tests are currently ignored.
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2869069. -->
Reported by: [mr.baileys](https://www.drupal.org/user/383424)
>>>
<p>Discovered when I tried to run the tests locally: tests for Entity Hierarchy are currently ignored by the testbot, and listed as "No tests found" (see <a href="https://www.drupal.org/pift-ci-job/639681">https://www.drupal.org/pift-ci-job/639681</a>). Cause seems to be a fatal error (which I also get when trying to run the tests locally):</p>
<pre>04:57:25 Fatal error: Trait 'Drupal\Tests\entity_hierarchy\EntityHierarchyTestTrait' not found in /var/www/html/modules/contrib/entity_hierarchy/tests/src/Kernel/EntityHierarchyKernelTestBase.php on line 13<br>04:57:25 PHP Fatal error: Trait 'Drupal\Tests\entity_hierarchy\EntityHierarchyTestTrait' not found in /var/www/html/modules/contrib/entity_hierarchy/tests/src/Kernel/EntityHierarchyKernelTestBase.php on line 13</pre><p>As per <a href="https://www.drupal.org/docs/8/phpunit/phpunit-file-structure-namespace-and-required-metadata#toc_0">Drupal Unit Test Suites: Auto-detected Tests</a>, Traits should be located in the <code>\Drupal\Tests\[module_name]\Traits</code>-namespace for autoloading.</p>
<p>Patch attached that fix the tests.</p>
issue