You are here

public function RouterTest::setUp in Drupal 7 to 8/9 Module Upgrader 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/Routing/Drupal7/RouterTest.php, line 16

Class

RouterTest
@group DMU.Routing

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Routing\Drupal7

Code

public function setUp() {
  parent::setUp();
  $this->router = new Router();
  foreach ($this
    ->hookMenu() as $path => $item) {
    $route = new RouteWrapper($path, $item);
    $this->router
      ->addRoute($route);
  }
}