summaryrefslogtreecommitdiffstatshomepage
path: root/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php
blob: 5e432156fe9760abf1215d090cdbdd5a6844049f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

declare(strict_types=1);

namespace Drupal\FunctionalTests;

use Drupal\Tests\BrowserTestBase;
use PHPUnit\Framework\Attributes\Group;

/**
 * Explicit test for BrowserTestBase::getTestMethodCaller().
 */
#[Group('browsertestbase')]
class GetTestMethodCallerTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * Tests BrowserTestBase::getTestMethodCaller().
   */
  public function testGetTestMethodCaller(): void {
    $method_caller = $this->getTestMethodCaller();
    $expected = [
      'file' => __FILE__,
      'line' => 25,
      'function' => __CLASS__ . '->' . __FUNCTION__ . '()',
      'class' => BrowserTestBase::class,
      'object' => $this,
      'type' => '->',
      'args' => [],
    ];
    $this->assertEquals($expected, $method_caller);
  }

}