GetTestMethodCallerTest.php 690 B

12345678910111213141516171819202122232425262728293031
  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. * Tests BrowserTestBase::getTestMethodCaller().
  12. */
  13. public function testGetTestMethodCaller() {
  14. $method_caller = $this->getTestMethodCaller();
  15. $expected = [
  16. 'file' => __FILE__,
  17. 'line' => 18,
  18. 'function' => __CLASS__ . '->' . __FUNCTION__ . '()',
  19. 'class' => BrowserTestBase::class,
  20. 'object' => $this,
  21. 'type' => '->',
  22. 'args' => [],
  23. ];
  24. $this->assertEquals($expected, $method_caller);
  25. }
  26. }