GetTestMethodCallerTest.php 759 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Drupal\FunctionalTests;
  3. use Drupal\Tests\BrowserTestBase;
  4. /**
  5. * Explicit test for BrowserTestBase::getTestMethodCaller().
  6. *
  7. * @group browsertestbase
  8. */
  9. class GetTestMethodCallerTest extends BrowserTestBase {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. protected $defaultTheme = 'stark';
  14. /**
  15. * Tests BrowserTestBase::getTestMethodCaller().
  16. */
  17. public function testGetTestMethodCaller() {
  18. $method_caller = $this->getTestMethodCaller();
  19. $expected = [
  20. 'file' => __FILE__,
  21. 'line' => 23,
  22. 'function' => __CLASS__ . '->' . __FUNCTION__ . '()',
  23. 'class' => BrowserTestBase::class,
  24. 'object' => $this,
  25. 'type' => '->',
  26. 'args' => [],
  27. ];
  28. $this->assertEquals($expected, $method_caller);
  29. }
  30. }