PhpUnitBridgeTest.php 759 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Drupal\FunctionalTests\Core\Test;
  3. use Drupal\Core\Url;
  4. use Drupal\Tests\BrowserTestBase;
  5. /**
  6. * Tests Drupal's integration with Symfony PHPUnit Bridge.
  7. *
  8. * @group Test
  9. * @group legacy
  10. */
  11. class PhpUnitBridgeTest extends BrowserTestBase {
  12. protected static $modules = ['deprecation_test'];
  13. /**
  14. * @expectedDeprecation This is the deprecation message for deprecation_test_function().
  15. */
  16. public function testSilencedError() {
  17. $this->assertEquals('known_return_value', deprecation_test_function());
  18. }
  19. /**
  20. * @expectedDeprecation This is the deprecation message for deprecation_test_function().
  21. */
  22. public function testErrorOnSiteUnderTest() {
  23. $this->drupalGet(Url::fromRoute('deprecation_test.route'));
  24. }
  25. }