GetTestMethodCallerExtendsTest.php 732 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Drupal\FunctionalTests;
  3. use Drupal\Tests\BrowserTestBase;
  4. /**
  5. * Test for BrowserTestBase::getTestMethodCaller() in child classes.
  6. *
  7. * @group browsertestbase
  8. */
  9. class GetTestMethodCallerExtendsTest extends GetTestMethodCallerTest {
  10. /**
  11. * A test method that is not present in the parent class.
  12. */
  13. public function testGetTestMethodCallerChildClass() {
  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. }