PHPCS: Disallow CanvasKernelTestBase subclasses to do `->getTypedData()->validate()`, use `assertEntityIsValid()` instead
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3582966. -->
Reported by: [wim leers](https://www.drupal.org/user/99777)
Related to !888
>>>
<h3 id="overview">Overview</h3>
<p><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3572847" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3572847</a></span> introduced a new kernel test with a valuable helper. </p>
<p>The use of that helper was enforced using PHPCS.</p>
<p>But it's not yet catching another pretty common pattern:</p>
<pre>$config_entity>getTypedData()->validate()</pre><p>How common? 37:<br>
<img src="https://www.drupal.org/files/issues/2026-04-03/Screenshot%202026-04-03%20at%2011.13.09%E2%80%AFAM.png"></p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>Update <code>\Canvas\Sniffs\Tests\KernelTestBaseSniff::requireAssertEntityIsValid()</code>.</p>
<h3 id="ui-changes">User interface changes</h3>
<p>None.</p>
issue