Verified Commit 48f9142d authored by Alex Pott's avatar Alex Pott
Browse files

task: #3630772 PHPUnit 12 deprecated using #[CoversClass] to target traits

By: dries
By: mondrake
(cherry picked from commit 0ba8e0d0)
parent 24a5527e
Loading
Loading
Loading
Loading
Loading
+2 −2
Changes for core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
use Drupal\layout_builder\Section;
use Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface;
use Drupal\layout_builder\SectionStorageInterface;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
@@ -27,7 +27,7 @@
/**
 * Tests Drupal\layout_builder\LayoutEntityHelperTrait.
 */
#[CoversClass(LayoutEntityHelperTrait::class)]
#[CoversTrait(LayoutEntityHelperTrait::class)]
#[Group('layout_builder')]
#[RunTestsInSeparateProcesses]
class LayoutEntityHelperTraitTest extends KernelTestBase {
+2 −2
Changes for core/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
use Drupal\rest\Plugin\rest\resource\EntityResourceValidationTrait;
use Drupal\Tests\UnitTestCase;
use Drupal\user\Entity\User;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
use Symfony\Component\Validator\ConstraintViolationInterface;
@@ -17,7 +17,7 @@
/**
 * Tests Drupal\rest\Plugin\rest\resource\EntityResourceValidationTrait.
 */
#[CoversClass(EntityResourceValidationTrait::class)]
#[CoversTrait(EntityResourceValidationTrait::class)]
#[Group('rest')]
class EntityResourceValidationTraitTest extends UnitTestCase {

+2 −2
Changes for core/tests/Drupal/KernelTests/Core/Entity/BundlePermissionHandlerTraitTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -8,14 +8,14 @@
use Drupal\Core\Entity\EntityInterface;
use Drupal\entity_test\Entity\EntityTestBundle;
use Drupal\KernelTests\KernelTestBase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests Drupal\Core\Entity\BundlePermissionHandlerTrait.
 */
#[CoversClass(BundlePermissionHandlerTrait::class)]
#[CoversTrait(BundlePermissionHandlerTrait::class)]
#[Group('Entity')]
#[RunTestsInSeparateProcesses]
class BundlePermissionHandlerTraitTest extends KernelTestBase {
+2 −2
Changes for core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\Core\Database\Stub\StubConnection;
use Drupal\Tests\Core\Database\Stub\StubSchema;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
@@ -20,7 +20,7 @@
/**
 * Tests Drupal\Core\Installer\InstallerRedirectTrait.
 */
#[CoversClass(InstallerRedirectTrait::class)]
#[CoversTrait(InstallerRedirectTrait::class)]
#[Group('Installer')]
#[RunTestsInSeparateProcesses]
class InstallerRedirectTraitTest extends KernelTestBase {
+2 −2
Changes for core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
use Drupal\Core\TypedData\Plugin\DataType\StringData;
use Drupal\Core\TypedData\TypedDataManagerInterface;
use Drupal\KernelTests\KernelTestBase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

@@ -26,7 +26,7 @@
/**
 * Tests Drupal\Core\Plugin\ContextAwarePluginTrait.
 */
#[CoversClass(ContextAwarePluginTrait::class)]
#[CoversTrait(ContextAwarePluginTrait::class)]
#[Group('Plugin')]
#[RunTestsInSeparateProcesses]
class ContextAwarePluginTraitTest extends KernelTestBase {
Loading