You are here

public function PURLBasicTest::setUp in Persistent URL 7

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

Set up test.

Overrides DrupalWebTestCase::setUp

File

tests/purl.test, line 83

Class

PURLBasicTest
Basic tests for PURL.

Code

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

  //$admin_user = $this->drupalCreateUser(array('administer blocks', 'administer languages', 'translate interface', 'access administration pages'));
  $this
    ->drupalLogin($admin_user);

  // Set up Spanish as second language.
  $this
    ->drupalPost('admin/config/regional/language/add', array(
    'langcode' => 'es',
  ), t('Add language'));

  // Enable URL language detection and selection.
  $edit = array(
    'language[enabled][locale-url]' => '1',
  );
  $this
    ->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
}