From d6b4376ba462ec69f8c7c7ae1987f81585741307 Mon Sep 17 00:00:00 2001 From: Lars Toomre Date: Fri, 28 Sep 2012 21:11:49 -0400 Subject: [PATCH] Issue 1798384 by Lars Toomre: Remove t() from assert tests in Update module. --- .../lib/Drupal/update/Tests/UpdateContribTest.php | 28 ++++++++++---------- .../lib/Drupal/update/Tests/UpdateCoreTest.php | 12 ++++---- .../lib/Drupal/update/Tests/UpdateTestBase.php | 2 +- .../lib/Drupal/update/Tests/UpdateUploadTest.php | 4 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php index 27328c0..df2bd5b 100644 --- a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php @@ -86,7 +86,7 @@ class UpdateContribTest extends UpdateTestBase { $this->assertText(t('Up to date')); $this->assertRaw('

' . t('Modules') . '

'); $this->assertNoText(t('Update available')); - $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.')); + $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.'); } /** @@ -147,10 +147,10 @@ class UpdateContribTest extends UpdateTestBase { $this->assertText(t('CCC Update test')); // We want aaa_update_test included in the ccc_update_test project, not as // its own project on the report. - $this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project does not appear.')); + $this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project does not appear.'); // The other two should be listed as projects. - $this->assertRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), t('Link to bbb_update_test project appears.')); - $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), t('Link to bbb_update_test project appears.')); + $this->assertRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), 'Link to bbb_update_test project appears.'); + $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), 'Link to bbb_update_test project appears.'); // We want to make sure we see the BBB project before the CCC project. // Instead of just searching for 'BBB Update test' or something, we want @@ -199,7 +199,7 @@ class UpdateContribTest extends UpdateTestBase { ); $this->refreshUpdateStatus($xml_mapping); $this->assertText(t('Security update required!')); - $this->assertRaw(l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme'), t('Link to the Update test base theme project appears.')); + $this->assertRaw(l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme'), 'Link to the Update test base theme project appears.'); } /** @@ -253,13 +253,13 @@ class UpdateContribTest extends UpdateTestBase { $this->assertNoText(t('Themes')); if ($check_disabled) { $this->assertText(t('Disabled themes')); - $this->assertRaw($base_theme_project_link, t('Link to the Update test base theme project appears.')); - $this->assertRaw($sub_theme_project_link, t('Link to the Update test subtheme project appears.')); + $this->assertRaw($base_theme_project_link, 'Link to the Update test base theme project appears.'); + $this->assertRaw($sub_theme_project_link, 'Link to the Update test subtheme project appears.'); } else { $this->assertNoText(t('Disabled themes')); - $this->assertNoRaw($base_theme_project_link, t('Link to the Update test base theme project does not appear.')); - $this->assertNoRaw($sub_theme_project_link, t('Link to the Update test subtheme project does not appear.')); + $this->assertNoRaw($base_theme_project_link, 'Link to the Update test base theme project does not appear.'); + $this->assertNoRaw($sub_theme_project_link, 'Link to the Update test subtheme project does not appear.'); } } } @@ -315,9 +315,9 @@ class UpdateContribTest extends UpdateTestBase { $this->assertUniqueText(t('Failed to get available update data for one project.')); // The other two should be listed as projects. - $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.')); - $this->assertNoRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), t('Link to bbb_update_test project does not appear.')); - $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), t('Link to bbb_update_test project appears.')); + $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.'); + $this->assertNoRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), 'Link to bbb_update_test project does not appear.'); + $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), 'Link to bbb_update_test project appears.'); } /** @@ -360,7 +360,7 @@ class UpdateContribTest extends UpdateTestBase { $this->drupalGet('admin/reports/updates'); $this->assertRaw('

' . t('Modules') . '

'); $this->assertText(t('Security update required!')); - $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.')); + $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.'); // Visit the reports page again without the altering and make sure the // status is back to normal. @@ -368,7 +368,7 @@ class UpdateContribTest extends UpdateTestBase { $this->drupalGet('admin/reports/updates'); $this->assertRaw('

' . t('Modules') . '

'); $this->assertNoText(t('Security update required!')); - $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), t('Link to aaa_update_test project appears.')); + $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.'); // Turn the altering back on and visit the Update manager UI. $update_test_config->set('update_status', $update_status)->save(); diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php index 5dc09fd..32dc111 100644 --- a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php @@ -55,9 +55,9 @@ class UpdateCoreTest extends UpdateTestBase { $this->assertNoText(t('Up to date')); $this->assertText(t('Update available')); $this->assertNoText(t('Security update required!')); - $this->assertRaw(l('7.1', 'http://example.com/drupal-7-1-release'), t('Link to release appears.')); - $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-1.tar.gz'), t('Link to download appears.')); - $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-1-release'), t('Link to release notes appears.')); + $this->assertRaw(l('7.1', 'http://example.com/drupal-7-1-release'), 'Link to release appears.'); + $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-1.tar.gz'), 'Link to download appears.'); + $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-1-release'), 'Link to release notes appears.'); } /** @@ -70,9 +70,9 @@ class UpdateCoreTest extends UpdateTestBase { $this->assertNoText(t('Up to date')); $this->assertNoText(t('Update available')); $this->assertText(t('Security update required!')); - $this->assertRaw(l('7.2', 'http://example.com/drupal-7-2-release'), t('Link to release appears.')); - $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-2.tar.gz'), t('Link to download appears.')); - $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-2-release'), t('Link to release notes appears.')); + $this->assertRaw(l('7.2', 'http://example.com/drupal-7-2-release'), 'Link to release appears.'); + $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-2.tar.gz'), 'Link to download appears.'); + $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-2-release'), 'Link to release notes appears.'); } /** diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php b/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php index 24032f7..99d01d1 100644 --- a/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php @@ -55,7 +55,7 @@ abstract class UpdateTestBase extends WebTestBase { */ protected function standardTests() { $this->assertRaw('

' . t('Drupal core') . '

'); - $this->assertRaw(l(t('Drupal'), 'http://example.com/project/drupal'), t('Link to the Drupal project appears.')); + $this->assertRaw(l(t('Drupal'), 'http://example.com/project/drupal'), 'Link to the Drupal project appears.'); $this->assertNoText(t('No available releases found')); } } diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php index c7ce8e1..4917630 100644 --- a/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php @@ -68,9 +68,9 @@ class UpdateUploadTest extends UpdateTestBase { function testFileNameExtensionMerging() { $this->drupalGet('admin/modules/install'); // Make sure the bogus extension supported by update_test.module is there. - $this->assertPattern('/file extensions are supported:.*update-test-extension/', t("Found 'update-test-extension' extension")); + $this->assertPattern('/file extensions are supported:.*update-test-extension/', "Found 'update-test-extension' extension."); // Make sure it didn't clobber the first option from core. - $this->assertPattern('/file extensions are supported:.*tar/', t("Found 'tar' extension")); + $this->assertPattern('/file extensions are supported:.*tar/', "Found 'tar' extension."); } /** -- 1.7.6.msysgit.0