Fix phpunit test discovery warnings
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3588755. --> Reported by: [penyaskito](https://www.drupal.org/user/959536) Related to !1070 >>> <h3 id="overview">Overview</h3> <pre>Test discovery warnings<br>-----------------------<br>* PHPUnit\Event\TestRunner\WarningTriggered: Class Drupal\canvas_ai_agents_test\Plugin\AgentsParameterTest\YamlPathEqualsTest declared in /builds/project/canvas/_drupal/web/modules/contrib/canvas/modules/canvas_ai/tests/modules/canvas_ai_agents_test/src/Plugin/AgentsParameterTest/YamlPathEqualsTest.php does not extend PHPUnit\Framework\TestCase<br>* PHPUnit\Event\TestRunner\WarningTriggered: Class Drupal\canvas_ai_agents_test\Plugin\AgentsParameterTest\YamlPathExistsTest declared in /builds/project/canvas/_drupal/web/modules/contrib/canvas/modules/canvas_ai/tests/modules/canvas_ai_agents_test/src/Plugin/AgentsParameterTest/YamlPathExistsTest.php does not extend PHPUnit\Framework\TestCase<br>* PHPUnit\Event\Test\PhpunitErrorTriggered: The data provider specified for Drupal\Tests\canvas\Unit\PropExpressionTest::testToString is invalid<br>&nbsp; The "media" entity type does not exist.<br>&nbsp; /builds/project/canvas/_drupal/web/core/lib/Drupal/Core/Test/PhpUnitTestDiscovery.php:146<br>&nbsp; /builds/project/canvas/_drupal/web/core/scripts/run-tests.sh:958<br>&nbsp; /builds/project/canvas/_drupal/web/core/scripts/run-tests.sh:200<br>&nbsp; <br>* PHPUnit\Event\Test\PhpunitErrorTriggered: The data provider specified for Drupal\Tests\canvas\Unit\PropExpressionTest::testFromString is invalid<br>&nbsp; The "media" entity type does not exist.<br>&nbsp; /builds/project/canvas/_drupal/web/core/lib/Drupal/Core/Test/PhpUnitTestDiscovery.php:146<br>&nbsp; /builds/project/canvas/_drupal/web/core/scripts/run-tests.sh:958<br>&nbsp; /builds/project/canvas/_drupal/web/core/scripts/run-tests.sh:200<br>&nbsp; <br>* PHPUnit\Event\Test\PhpunitErrorTriggered: The data provider specified for Drupal\Tests\canvas\Unit\PropExpressionTest::testGetReferenceChainPrefixes is invalid<br>&nbsp; The "media" entity type does not exist.<br>&nbsp; /builds/project/canvas/_drupal/web/core/lib/Drupal/Core/Test/PhpUnitTestDiscovery.php:146<br>&nbsp; /builds/project/canvas/_drupal/web/core/scripts/run-tests.sh:958<br>&nbsp; /builds/project/canvas/_drupal/web/core/scripts/run-tests.sh:200</pre><h3 id="proposed-resolution">Proposed resolution</h3> <p>Fix warnings (there are only 2 different groups of warnings, so affordable in a single issue)</p> <ul> <li>Rename <code>YamlPath{Equals,Exists}Test</code> plugin classes, so they don't end in <code>*Test</code></li> <li>Fix <code>PropExpressionTest</code> data provider 'media' entity error</li> </ul> <h3 id="ui-changes">User interface changes</h3> <p>None.</p>
issue