You are here

public function PathautoTestHelperTrait::assertNoEntityAliasExists in Pathauto 8

4 calls to PathautoTestHelperTrait::assertNoEntityAliasExists()
PathautoBulkUpdateTest::testBulkUpdate in tests/src/Functional/PathautoBulkUpdateTest.php
PathautoEntityWithStringIdTest::testEntityWithStringId in tests/src/Kernel/PathautoEntityWithStringIdTest.php
Test aliasing entities with long string ID.
PathautoKernelTest::testNoTokensNoAlias in tests/src/Kernel/PathautoKernelTest.php
Test that \Drupal::service('pathauto.generator')->createEntityAlias() will not create an alias for a pattern that does not get any tokens replaced.
PathautoNodeWebTest::testNodeState in tests/src/Functional/PathautoNodeWebTest.php
@todo Merge this with existing node test methods?

File

tests/src/Functional/PathautoTestHelperTrait.php, line 110

Class

PathautoTestHelperTrait
Helper test class with some added functions for testing.

Namespace

Drupal\Tests\pathauto\Functional

Code

public function assertNoEntityAliasExists(EntityInterface $entity, $alias = NULL) {
  $path = [
    'path' => '/' . $entity
      ->toUrl()
      ->getInternalPath(),
  ];
  if (!empty($alias)) {
    $path['alias'] = $alias;
  }
  $this
    ->assertNoAliasExists($path);
}