Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / tests / src / Unit / Utility / Path / Drupal7 / PathComponentTest.php
diff --git a/web/modules/contrib/drupalmoduleupgrader/tests/src/Unit/Utility/Path/Drupal7/PathComponentTest.php b/web/modules/contrib/drupalmoduleupgrader/tests/src/Unit/Utility/Path/Drupal7/PathComponentTest.php
new file mode 100644 (file)
index 0000000..253b445
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\Tests\drupalmoduleupgrader\Unit\Utility\Path\Drupal7;
+
+use Drupal\drupalmoduleupgrader\Utility\Path\Drupal7\PathComponent;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @group DMU.Utility.Path
+ */
+class PathComponentTest extends UnitTestCase {
+
+  public function testPathComponent() {
+    $placeholder = new PathComponent('%');
+    $this->assertTrue($placeholder->isPlaceholder());
+    $this->assertFalse($placeholder->isWildcard());
+    $this->assertEquals('%', $placeholder->__toString());
+
+    $wildcard = new PathComponent('%node');
+    $this->assertTrue($wildcard->isWildcard());
+    $this->assertFalse($wildcard->isPlaceholder());
+    $this->assertEquals('%node', $wildcard->__toString('%node'));
+  }
+
+}