function ArgumentsResolverTest::testHandleUnresolvedArgument

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testHandleUnresolvedArgument()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testHandleUnresolvedArgument()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testHandleUnresolvedArgument()

Tests handleUnresolvedArgument() for missing arguments.

@dataProvider providerTestHandleUnresolvedArgument

File

core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php, line 176

Class

ArgumentsResolverTest
@coversDefaultClass \Drupal\Component\Utility\ArgumentsResolver @group Access

Namespace

Drupal\Tests\Component\Utility

Code

public function testHandleUnresolvedArgument($callable) : void {
    $resolver = new ArgumentsResolver([], [], []);
    $this->expectException(\RuntimeException::class);
    $this->expectExceptionMessage('requires a value for the "$foo" argument.');
    $resolver->getArguments($callable);
}

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