You are here

function PathautoTestHelper::assertNoEntityAliasExists in Pathauto 7

Same name and namespace in other branches
  1. 6.2 pathauto.test \PathautoTestHelper::assertNoEntityAliasExists()
  2. 6 pathauto.test \PathautoTestHelper::assertNoEntityAliasExists()
3 calls to PathautoTestHelper::assertNoEntityAliasExists()
PathautoBulkUpdateTestCase::testBulkUpdate in ./pathauto.test
PathautoFunctionalTestCase::testNodeState in ./pathauto.test
@todo Merge this with existing node test methods?
PathautoUnitTestCase::testNoTokensNoAlias in ./pathauto.test
Test that pathauto_create_alias() will not create an alias for a pattern that does not get any tokens replaced.

File

./pathauto.test, line 58
Functionality tests for Pathauto.

Class

PathautoTestHelper
Helper test class with some added functions for testing.

Code

function assertNoEntityAliasExists($entity_type, $entity, $alias = NULL) {
  $uri = entity_uri($entity_type, $entity);
  $path = array(
    'source' => $uri['path'],
  );
  if (!empty($alias)) {
    $path['alias'] = $alias;
  }
  $this
    ->assertNoAliasExists($path);
}