3 namespace Drupal\Tests\drupalmoduleupgrader\Unit\Utility\Path\Drupal7;
5 use Drupal\drupalmoduleupgrader\Utility\Path\Drupal7\PathComponent;
6 use Drupal\Tests\UnitTestCase;
9 * @group DMU.Utility.Path
11 class PathComponentTest extends UnitTestCase {
13 public function testPathComponent() {
14 $placeholder = new PathComponent('%');
15 $this->assertTrue($placeholder->isPlaceholder());
16 $this->assertFalse($placeholder->isWildcard());
17 $this->assertEquals('%', $placeholder->__toString());
19 $wildcard = new PathComponent('%node');
20 $this->assertTrue($wildcard->isWildcard());
21 $this->assertFalse($wildcard->isPlaceholder());
22 $this->assertEquals('%node', $wildcard->__toString('%node'));