diff --git a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php index 116f0dac..3e130ba3 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php @@ -9,6 +9,7 @@ use Drupal\Composer\Plugin\VendorHardening\Config; use Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin; use Drupal\Tests\PhpUnitCompatibilityTrait; +use Drupal\Tests\Traits\PhpUnitWarnings; use org\bovigo\vfs\vfsStream; use PHPUnit\Framework\TestCase; @@ -18,6 +19,7 @@ */ class VendorHardeningPluginTest extends TestCase { + use PhpUnitWarnings; use PhpUnitCompatibilityTrait; public function setUp(): void { diff --git a/core/tests/Drupal/Tests/Traits/PhpUnitWarnings.php b/core/tests/Drupal/Tests/Traits/PhpUnitWarnings.php index c24f1210..9e16ae95 100644 --- a/core/tests/Drupal/Tests/Traits/PhpUnitWarnings.php +++ b/core/tests/Drupal/Tests/Traits/PhpUnitWarnings.php @@ -39,7 +39,6 @@ 'Test warning for \Drupal\Tests\PhpUnitWarningsTest::testAddWarning()', // PHPUnit 9. 'assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.', - 'PHPUnit\\Framework\\TestCase::prophesize() is deprecated and will be removed in PHPUnit 10. Please use the trait provided by phpspec/prophecy-phpunit.', 'assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.', 'assertNotRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDoesNotMatchRegularExpression() instead.', 'assertDirectoryNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryDoesNotExist() instead.',