Commit 4a0b83bf authored by jhodgdon's avatar jhodgdon
Browse files

Issue #1797372 by xjm: Remove t() from assert messages in path module tests

parent c259b8ec
......@@ -52,14 +52,14 @@ function testPathCache() {
// created.
cache('path')->flush();
$this->drupalGet($edit['source']);
$this->assertTrue(cache('path')->get($edit['source']), t('Cache entry was created.'));
$this->assertTrue(cache('path')->get($edit['source']), 'Cache entry was created.');
// Visit the alias for the node and confirm a cache entry is created.
cache('path')->flush();
$this->drupalGet($edit['alias']);
// @todo The alias should actually have been cached with the system path as
// the key, see the todo in drupal_cache_system_paths() in path.inc.
$this->assertTrue(cache('path')->get($edit['alias']), t('Cache entry was created.'));
$this->assertTrue(cache('path')->get($edit['alias']), 'Cache entry was created.');
}
/**
......
......@@ -95,7 +95,7 @@ function testAliasTranslation() {
drupal_static_reset('language_url_rewrite_url');
$languages = language_list();
$url = url('node/' . $french_node->nid, array('language' => $languages[$french_node->langcode]));
$this->assertTrue(strpos($url, $edit['path[alias]']), t('URL contains the path alias.'));
$this->assertTrue(strpos($url, $edit['path[alias]']), 'URL contains the path alias.');
// Confirm that the alias works even when changing language negotiation
// options. Enable User language detection and selection over URL one.
......@@ -139,22 +139,22 @@ function testAliasTranslation() {
// situation only aliases in the default language and language neutral ones
// should keep working.
$this->drupalGet($french_alias);
$this->assertResponse(404, t('Alias for French translation is unavailable when URL language negotiation is disabled.'));
$this->assertResponse(404, 'Alias for French translation is unavailable when URL language negotiation is disabled.');
// drupal_lookup_path() has an internal static cache. Check to see that
// it has the appropriate contents at this point.
drupal_lookup_path('wipe');
$french_node_path = drupal_lookup_path('source', $french_alias, $french_node->langcode);
$this->assertEqual($french_node_path, 'node/' . $french_node->nid, t('Normal path works.'));
$this->assertEqual($french_node_path, 'node/' . $french_node->nid, 'Normal path works.');
// Second call should return the same path.
$french_node_path = drupal_lookup_path('source', $french_alias, $french_node->langcode);
$this->assertEqual($french_node_path, 'node/' . $french_node->nid, t('Normal path is the same.'));
$this->assertEqual($french_node_path, 'node/' . $french_node->nid, 'Normal path is the same.');
// Confirm that the alias works.
$french_node_alias = drupal_lookup_path('alias', 'node/' . $french_node->nid, $french_node->langcode);
$this->assertEqual($french_node_alias, $french_alias, t('Alias works.'));
$this->assertEqual($french_node_alias, $french_alias, 'Alias works.');
// Second call should return the same alias.
$french_node_alias = drupal_lookup_path('alias', 'node/' . $french_node->nid, $french_node->langcode);
$this->assertEqual($french_node_alias, $french_alias, t('Alias is the same.'));
$this->assertEqual($french_node_alias, $french_alias, 'Alias is the same.');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment