diff options
Diffstat (limited to 'modules/locale/locale.test')
-rw-r--r-- | modules/locale/locale.test | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 79a578e94..ebd7febbc 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -37,7 +37,7 @@ class LocaleTestCase extends DrupalWebTestCase { // Add language. $this->drupalLogin($admin_user); - $edit = array ( + $edit = array( 'langcode' => $langcode, 'name' => $name, 'native' => $native, @@ -65,7 +65,7 @@ class LocaleTestCase extends DrupalWebTestCase { 'translation' => 'all', 'group' => 'all', ); - $this->drupalPost('admin/build/translate/search', $search, t('Search')); + $this->drupalPost('admin/build/translate/translate', $search, t('Filter')); // assertText seems to remove the input field where $name always could be // found, so this is not a false assert. See how assertNoText succeeds // later. @@ -75,7 +75,9 @@ class LocaleTestCase extends DrupalWebTestCase { // reasonable. $this->clickLink(t('edit')); // We save the lid from the path. - $lid = preg_replace('/\D/', '', substr($this->getUrl(), strlen($base_url))); + $matches = array(); + preg_match('!admin/build/translate/edit/(\d)+!', $this->getUrl(), $matches); + $lid = $matches[1]; // No t() here, it's surely not translated yet. $this->assertText($name, 'name found on edit screen'); $edit = array ( @@ -84,7 +86,7 @@ class LocaleTestCase extends DrupalWebTestCase { $this->drupalPost(NULL, $edit, t('Save translations')); $this->assertText(t('The string has been saved.'), 'The string has been saved.'); $this->assertTrue($name != $translation && t($name, array(), $langcode) == $translation, 't() works'); - $this->drupalPost('admin/build/translate/search', $search, t('Search')); + $this->drupalPost('admin/build/translate/translate', $search, t('Filter')); // The indicator should not be here. $this->assertNoRaw($language_indicator, 'String is translated'); $this->drupalLogout(); @@ -107,7 +109,7 @@ class LocaleTestCase extends DrupalWebTestCase { $this->drupalLogin($translate_user); $this->drupalPost('admin/build/translate/delete/' . $lid, array(), t('Delete')); $this->assertText(t('The string has been removed.'), 'The string has been removed message.'); - $this->drupalPost('admin/build/translate/search', $search, t('Search')); + $this->drupalPost('admin/build/translate/translate', $search, t('Filter')); $this->assertNoText($name, 'Search now can not find the name'); } @@ -155,7 +157,7 @@ class LocaleTestCase extends DrupalWebTestCase { 'translation' => 'all', 'group' => 'all', ); - $this->drupalPost('admin/build/translate/search', $search, t('Search')); + $this->drupalPost('admin/build/translate/translate', $search, t('Filter')); // Find the edit path $content = $this->drupalGetContent(); $this->assertTrue(preg_match('@(admin/build/translate/edit/[0-9]+)@', $content, $matches), t('Found the edit path')); |