You are here

public function ParameterBindingTest::testIsPathPosition in Drupal 7 to 8/9 Module Upgrader 8

File

tests/src/Unit/Routing/ParameterBindingTest.php, line 72

Class

ParameterBindingTest
@group DMU.Routing

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Routing

Code

public function testIsPathPosition() {
  $path = new PathUtility('foo/%node');
  $binding = new ParameterBinding($path, $this->parameter, 1);
  $this
    ->assertTrue($binding
    ->isPathPosition());
  $path = new PathUtility('foo/%');
  $binding = new ParameterBinding($path, $this->parameter, 'baz');
  $this
    ->assertFalse($binding
    ->isPathPosition());
}