public function ParameterBindingTest::testHasArgument in Drupal 7 to 8/9 Module Upgrader 8
File
- tests/
src/ Unit/ Routing/ ParameterBindingTest.php, line 48
Class
- ParameterBindingTest
- @group DMU.Routing
Namespace
Drupal\Tests\drupalmoduleupgrader\Unit\RoutingCode
public function testHasArgument() {
$path = new PathUtility('foo/baz');
$binding = new ParameterBinding($path, $this->parameter);
$this
->assertFalse($binding
->hasArgument());
$path = new PathUtility('foo/%node');
$binding = new ParameterBinding($path, $this->parameter, 1);
$this
->assertTrue($binding
->hasArgument());
$path = new PathUtility('foo/%');
$binding = new ParameterBinding($path, $this->parameter, 'baz');
$this
->assertTrue($binding
->hasArgument());
}