You are here

public function ArgumentsResolverTest::testHandleUnresolvedArgument in Drupal 8

Same name and namespace in other branches
  1. 9 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 170
Contains \Drupal\Tests\Component\Utility\ArgumentsResolverTest.

Class

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

Namespace

Drupal\Tests\Component\Utility

Code

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