You are here

public function PURLPathAliasTest::setUp in Persistent URL 6

Same name and namespace in other branches
  1. 7 tests/purl.test \PURLPathAliasTest::setUp()

Set up test.

Overrides DrupalWebTestCase::setUp

File

tests/purl.test, line 18

Class

PURLPathAliasTest

Code

public function setUp() {
  parent::setUp('ctools', 'locale', 'path', 'purl', 'purl_test');
  $admin_user = $this
    ->drupalCreateUser(array(
    'create page content',
    'create url aliases',
    'administer languages',
    'administer site configuration',
  ));
  $this
    ->drupalLogin($admin_user);

  // Set up Spanish as second language.
  $this
    ->drupalPost('admin/settings/language/add', array(
    'langcode' => 'es',
  ), t('Add language'));
  $this
    ->drupalPost('admin/settings/language/configure', array(
    'language_negotiation' => 1,
  ), t('Save settings'));

  // Add a node with path alias.
  $this
    ->drupalPost('node/add/page', array(
    'title' => 'purlTest',
    'path' => 'purlTest',
  ), t('Save'));
}