Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / tests / src / Unit / Routing / Drupal8 / RouteWrapperTest.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\Tests\drupalmoduleupgrader\Unit\Converter\Routing\Drupal8\RouteWrapperTest.
6  */
7
8 namespace Drupal\Tests\drupalmoduleupgrader\Unit\Routing\Drupal8;
9
10 use Drupal\drupalmoduleupgrader\Routing\Drupal8\RouteWrapper;
11 use Drupal\Tests\UnitTestCase;
12 use Symfony\Component\Routing\Route;
13
14 /**
15  * @group DMU.Routing
16  */
17 class RouteWrapperTest extends UnitTestCase {
18
19   private $route, $wrapper;
20
21   public function __construct() {
22     $this->route = new Route('user/{user}/edit');
23     $this->wrapper = new RouteWrapper('user.edit', $this->route, $this->getMock('\Drupal\Core\Routing\RouteProviderInterface'));
24   }
25
26   public function testGetIdentifier() {
27     $this->assertEquals('user.edit', $this->wrapper->getIdentifier());
28   }
29
30   public function testGetPath() {
31     $this->assertInstanceOf('\Drupal\drupalmoduleupgrader\Utility\Path\Drupal8\PathUtility', $this->wrapper->getPath());
32     $this->assertEquals('/user/{user}/edit', $this->wrapper->getPath());
33   }
34
35 }