public function ArgumentsResolverTest::testGetWildcardArgumentNoTypehint in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testGetWildcardArgumentNoTypehint()
Tests getArgument() with a wildcard parameter with no typehint.
Without the typehint, the wildcard object will not be passed to the callable.
@expectedException \RuntimeException @expectedExceptionMessage requires a value for the "$route" argument.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ ArgumentsResolverTest.php, line 128 - Contains \Drupal\Tests\Component\Utility\ArgumentsResolverTest.
Class
- ArgumentsResolverTest
- @coversDefaultClass \Drupal\Component\Utility\ArgumentsResolver @group Access
Namespace
Drupal\Tests\Component\UtilityCode
public function testGetWildcardArgumentNoTypehint() {
$a = $this
->getMock('\\Drupal\\Tests\\Component\\Utility\\TestInterface1');
$wildcards = [
$a,
];
$resolver = new ArgumentsResolver([], [], $wildcards);
$callable = function ($route) {
};
$arguments = $resolver
->getArguments($callable);
$this
->assertNull($arguments);
}