SkippedDeprecationTest.php 786 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Drupal\Tests;
  3. /**
  4. * @group Test
  5. */
  6. class SkippedDeprecationTest extends UnitTestCase {
  7. /**
  8. * Tests skipping deprecations in unit tests.
  9. *
  10. * @see \Drupal\Tests\Listeners\DeprecationListenerTrait::getSkippedDeprecations()
  11. */
  12. public function testSkippingDeprecations() {
  13. @trigger_error('\Drupal\Tests\SkippedDeprecationTest deprecation', E_USER_DEPRECATED);
  14. $this->addToAssertionCount(1);
  15. }
  16. /**
  17. * Tests skipping deprecations in unit tests multiple times.
  18. *
  19. * @see \Drupal\Tests\Listeners\DeprecationListenerTrait::getSkippedDeprecations()
  20. */
  21. public function testSkippingDeprecationsAgain() {
  22. @trigger_error('\Drupal\Tests\SkippedDeprecationTest deprecation', E_USER_DEPRECATED);
  23. $this->addToAssertionCount(1);
  24. }
  25. }