You are here

public function PURLPathAliasTest::test in Persistent URL 6

Run test.

File

tests/purl.test, line 40

Class

PURLPathAliasTest

Code

public function test() {
  variable_set('purl_types', array(
    'path' => 'path',
    'pair' => 'pair',
    'extension' => 'extension',
    'querystring' => 'querystring',
  ));
  variable_set('purl_method_purl_test', 'path');
  $this
    ->drupalGet('purlTest');
  $this
    ->assertText('purlTest', t('Node page found.'));
  $this
    ->drupalGet('sweden/purlTest');
  $this
    ->assertText('purlTest', t('Node page found.'));

  // This will not pass. The behavior in Drupal core is to ignore path
  // aliases that are not registered under the current language.
  // $this->drupalGet('es/sweden/purlTest');
  // $this->assertText('purlTest', t('Node page found.'));
}