You are here

public function RouterBaseTest::testAddRoute in Drupal 7 to 8/9 Module Upgrader 8

File

tests/src/Unit/Routing/RouterBaseTest.php, line 35

Class

RouterBaseTest
@group DMU.Routing

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Routing

Code

public function testAddRoute() {
  $router = new RouterBase();
  $this
    ->assertCount(0, $router);
  $route = new RouteWrapper('user.edit', $this->userEdit, $this->routeProvider);
  $router
    ->addRoute($route);
  $this
    ->assertCount(1, $router);
}