You are here

public function AliasLinkEnhancerTest::testTransform in Gatsby Live Preview & Incremental Builds 2.0.x

Same name and namespace in other branches
  1. 8 modules/gatsby_extras/tests/src/Kernel/AliasLinkEnhancerTest.php \Drupal\Tests\gatsby_extras\Kernel\AliasLinkEnhancerTest::testTransform()

Test transform.

File

modules/gatsby_extras/tests/src/Kernel/AliasLinkEnhancerTest.php, line 78

Class

AliasLinkEnhancerTest
Defines a test for AliasLinkEnhancer.

Namespace

Drupal\Tests\gatsby_extras\Kernel

Code

public function testTransform() {
  $output = $this->enhancer
    ->transform([
    'uri' => sprintf('entity:taxonomy_term/%s/%s', $this->term
      ->bundle(), $this->term
      ->uuid()),
  ]);
  $this
    ->assertEquals($this->pathAlias
    ->getAlias(), $output['uri_alias']);
}