function ErrorTest::testGetLastCaller

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Utility/ErrorTest.php \Drupal\Tests\Core\Utility\ErrorTest::testGetLastCaller()
  2. 10 core/tests/Drupal/Tests/Core/Utility/ErrorTest.php \Drupal\Tests\Core\Utility\ErrorTest::testGetLastCaller()
  3. 9 core/tests/Drupal/Tests/Core/Utility/ErrorTest.php \Drupal\Tests\Core\Utility\ErrorTest::testGetLastCaller()
  4. 8.9.x core/tests/Drupal/Tests/Core/Utility/ErrorTest.php \Drupal\Tests\Core\Utility\ErrorTest::testGetLastCaller()

Tests the getLastCaller() method.

Attributes

#[DataProvider('providerTestGetLastCaller')]

Parameters

array $backtrace: The test backtrace array.

array $expected: The expected return array.

File

core/tests/Drupal/Tests/Core/Utility/ErrorTest.php, line 28

Class

ErrorTest
Tests Drupal\Core\Utility\Error.

Namespace

Drupal\Tests\Core\Utility

Code

public function testGetLastCaller(array $backtrace, array $expected) : void {
  $this->assertSame($expected, Error::getLastCaller($backtrace));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.