You are here

public function PathUtilityTest::testFind in Drupal 7 to 8/9 Module Upgrader 8

Same name in this branch
  1. 8 tests/src/Unit/Utility/Path/Drupal7/PathUtilityTest.php \Drupal\Tests\drupalmoduleupgrader\Unit\Utility\Path\Drupal7\PathUtilityTest::testFind()
  2. 8 tests/src/Unit/Utility/Path/Drupal8/PathUtilityTest.php \Drupal\Tests\drupalmoduleupgrader\Unit\Utility\Path\Drupal8\PathUtilityTest::testFind()

File

tests/src/Unit/Utility/Path/Drupal7/PathUtilityTest.php, line 58

Class

PathUtilityTest
@group DMU.Utility.Path

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Utility\Path\Drupal7

Code

public function testFind() {
  $result = $this->path
    ->find('foo');
  $this
    ->assertCount(1, $result);
  $this
    ->assertInstanceOf('Drupal\\drupalmoduleupgrader\\Utility\\Path\\Drupal7\\PathComponent', $result
    ->first());
  $this
    ->assertEquals('foo', $result
    ->first()
    ->__toString());
}