summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Hodgdon2013-07-09 14:06:52 (GMT)
committerJennifer Hodgdon2013-07-09 14:06:52 (GMT)
commit317230271a25b947940f204fbe0fd65d1cb9fa17 (patch)
treedf5d0abe1c669ec072674fce21a27d7b29ef3168
parent73063ee49a818f11cf4763280f620db5a687a8ef (diff)
Issue #2035087 by lazysoundsystem, Crell, Cottser: Remove remaining t() from test assert messages in views and views_ui
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/BasicTest.php8
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Handler/SortDateTest.php5
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Handler/SortRandomTest.php6
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Handler/SortTest.php8
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/CacheTest.php8
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php4
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php4
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php4
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php6
12 files changed, 30 insertions, 29 deletions
diff --git a/core/modules/views/lib/Drupal/views/Tests/BasicTest.php b/core/modules/views/lib/Drupal/views/Tests/BasicTest.php
index d66d304..aef6a50 100644
--- a/core/modules/views/lib/Drupal/views/Tests/BasicTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/BasicTest.php
@@ -38,7 +38,7 @@ class BasicTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(5, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->dataSet(), array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -97,7 +97,7 @@ class BasicTest extends ViewUnitTestBase {
);
// Verify the result.
- $this->assertEqual(3, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(3, count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultSet($view, $dataset, array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -123,7 +123,7 @@ class BasicTest extends ViewUnitTestBase {
);
// Verify the result.
- $this->assertEqual(1, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(1, count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultSet($view, $dataset, array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -136,7 +136,7 @@ class BasicTest extends ViewUnitTestBase {
// Build the expected result.
$dataset = $this->dataSet();
- $this->assertEqual(5, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultSet($view, $dataset, array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/SortDateTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/SortDateTest.php
index d6d9462..813701e 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/SortDateTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/SortDateTest.php
@@ -7,6 +7,7 @@
namespace Drupal\views\Tests\Handler;
+use Drupal\Component\Utility\String;
use Drupal\views\Tests\ViewUnitTestBase;
/**
@@ -199,10 +200,10 @@ class SortDateTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(count($this->dataSet()), count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->expectedResultSet($granularity, $reverse), array(
'views_test_data_name' => 'name',
- ), t('Result is returned correctly when ordering by granularity @granularity, @reverse.', array('@granularity' => $granularity, '@reverse' => $reverse ? t('reverse') : t('forward'))));
+ ), String::format('Result is returned correctly when ordering by granularity @granularity, @reverse.', array('@granularity' => $granularity, '@reverse' => $reverse ? 'reverse' : 'forward')));
$view->destroy();
unset($view);
}
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/SortRandomTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/SortRandomTest.php
index 2fabc21..c7745b5 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/SortRandomTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/SortRandomTest.php
@@ -76,7 +76,7 @@ class SortRandomTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(count($this->dataSet()), count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->dataSet(), array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -85,7 +85,7 @@ class SortRandomTest extends ViewUnitTestBase {
// Execute a random view, we expect the result set to be different.
$view_random = $this->getBasicRandomView();
$this->executeView($view_random);
- $this->assertEqual(count($this->dataSet()), count($view_random->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view_random->result), 'The number of returned rows match.');
$this->assertNotIdenticalResultset($view_random, $view->result, array(
'views_test_data_name' => 'views_test_data_name',
'views_test_data_age' => 'views_test_data_name',
@@ -94,7 +94,7 @@ class SortRandomTest extends ViewUnitTestBase {
// Execute a second random view, we expect the result set to be different again.
$view_random_2 = $this->getBasicRandomView();
$this->executeView($view_random_2);
- $this->assertEqual(count($this->dataSet()), count($view_random_2->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view_random_2->result), 'The number of returned rows match.');
$this->assertNotIdenticalResultset($view_random, $view->result, array(
'views_test_data_name' => 'views_test_data_name',
'views_test_data_age' => 'views_test_data_name',
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/SortTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/SortTest.php
index 35c62db..b7012ae 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/SortTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/SortTest.php
@@ -51,7 +51,7 @@ class SortTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(count($this->dataSet()), count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'age'), array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -75,7 +75,7 @@ class SortTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(count($this->dataSet()), count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'age', TRUE), array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -104,7 +104,7 @@ class SortTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(count($this->dataSet()), count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'name'), array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
@@ -128,7 +128,7 @@ class SortTest extends ViewUnitTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(count($this->dataSet()), count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(count($this->dataSet()), count($view->result), 'The number of returned rows match.');
$this->assertIdenticalResultset($view, $this->orderResultSet($this->dataSet(), 'name', TRUE), array(
'views_test_data_name' => 'name',
'views_test_data_age' => 'age',
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
index d5c4375..fa80f07 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
@@ -59,7 +59,7 @@ class AccessTest extends PluginTestBase {
$view = views_get_view('test_access_none');
$view->setDisplay();
- $this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime'));
+ $this->assertTrue($view->display_handler->access($this->admin_user), 'Admin-Account should be able to access the view everytime');
$this->assertTrue($view->display_handler->access($this->web_user));
$this->assertTrue($view->display_handler->access($this->normal_user));
}
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/CacheTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/CacheTest.php
index f1da997..4dc8a56 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/CacheTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/CacheTest.php
@@ -56,7 +56,7 @@ class CacheTest extends PluginTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(5, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
// Add another man to the beatles.
$record = array(
@@ -79,7 +79,7 @@ class CacheTest extends PluginTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(5, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
}
/**
@@ -98,7 +98,7 @@ class CacheTest extends PluginTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(5, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(5, count($view->result), 'The number of returned rows match.');
// Add another man to the beatles.
$record = array(
@@ -119,7 +119,7 @@ class CacheTest extends PluginTestBase {
$this->executeView($view);
// Verify the result.
- $this->assertEqual(6, count($view->result), t('The number of returned rows match.'));
+ $this->assertEqual(6, count($view->result), 'The number of returned rows match.');
}
/**
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php
index cbc8279..75436c4 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php
@@ -260,7 +260,7 @@ class PagerTest extends PluginTestBase {
$view->pager = NULL;
$output = $view->render();
$output = drupal_render($output);
- $this->assertEqual(preg_match('/<ul class="pager">/', $output), 0, t('The pager is not rendered.'));
+ $this->assertEqual(preg_match('/<ul class="pager">/', $output), 0, 'The pager is not rendered.');
}
/**
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php
index 25a10f3..d033a06 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php
@@ -196,7 +196,7 @@ class StyleTest extends ViewTestBase {
// The newer api passes the value of the grouping as well.
$sets_new_rendered = $view->style_plugin->renderGrouping($view->result, $view->style_plugin->options['grouping'], TRUE);
- $this->assertEqual($sets_new_rendered, $expected, t('The style plugins should proper group the results with grouping by the rendered output.'));
+ $this->assertEqual($sets_new_rendered, $expected, 'The style plugins should proper group the results with grouping by the rendered output.');
// Don't test stripped case, because the actual value is not stripped.
if (!$stripped) {
@@ -214,7 +214,7 @@ class StyleTest extends ViewTestBase {
unset($expected['Job: Drummer']);
unset($expected['Drummer']['rows']['Age: 28']);
- $this->assertEqual($sets_new_value, $expected, t('The style plugins should proper group the results with grouping by the value.'));
+ $this->assertEqual($sets_new_value, $expected, 'The style plugins should proper group the results with grouping by the value.');
}
}
diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php
index b663298..122337b 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php
@@ -135,7 +135,7 @@ class BasicTest extends WizardTestBase {
$this->assertNoText($node2->label());
// Make sure the listing page doesn't show disabled default views.
- $this->assertNoText('tracker', t('Default tracker view does not show on the listing page.'));
+ $this->assertNoText('tracker', 'Default tracker view does not show on the listing page.');
}
/**
diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php
index f51de22..e6808c7 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php
@@ -72,7 +72,7 @@ class ItemsPerPageTest extends WizardTestBase {
$pos4 = strpos($content, $node4->label());
$pos3 = strpos($content, $node3->label());
$pos2 = strpos($content, $node2->label());
- $this->assertTrue($pos5 < $pos4 && $pos4 < $pos3 && $pos3 < $pos2, t('The nodes appear in the expected order in the page display.'));
+ $this->assertTrue($pos5 < $pos4 && $pos4 < $pos3 && $pos3 < $pos2, 'The nodes appear in the expected order in the page display.');
// Confirm that the block is listed in the block administration UI.
$this->drupalGet('admin/structure/block/list/block_plugin_ui:' . config('system.theme')->get('default') . '/add');
@@ -93,7 +93,7 @@ class ItemsPerPageTest extends WizardTestBase {
$pos5 = strpos($content, $node5->label());
$pos4 = strpos($content, $node4->label());
$pos3 = strpos($content, $node3->label());
- $this->assertTrue($pos5 < $pos4 && $pos4 < $pos3, t('The nodes appear in the expected order in the block display.'));
+ $this->assertTrue($pos5 < $pos4 && $pos4 < $pos3, 'The nodes appear in the expected order in the block display.');
}
}
diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php
index f7c9712..20839b5 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php
@@ -53,7 +53,7 @@ class SortingTest extends WizardTestBase {
$pos1 = strpos($content, $node1->label());
$pos2 = strpos($content, $node2->label());
$pos3 = strpos($content, $node3->label());
- $this->assertTrue($pos1 < $pos2 && $pos2 < $pos3, t('The nodes appear in the expected order in a view that sorts by oldest first.'));
+ $this->assertTrue($pos1 < $pos2 && $pos2 < $pos3, 'The nodes appear in the expected order in a view that sorts by oldest first.');
// Create a view that sorts newest first.
$view2 = array();
@@ -78,7 +78,7 @@ class SortingTest extends WizardTestBase {
$pos3 = strpos($content, $node3->label());
$pos2 = strpos($content, $node2->label());
$pos1 = strpos($content, $node1->label());
- $this->assertTrue($pos3 < $pos2 && $pos2 < $pos1, t('The nodes appear in the expected order in a view that sorts by newest first.'));
+ $this->assertTrue($pos3 < $pos2 && $pos2 < $pos1, 'The nodes appear in the expected order in a view that sorts by newest first.');
}
}
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
index 5757bcd..9024d36 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
@@ -84,7 +84,7 @@ class ExposedFormUITest extends UITestBase {
// Now check the sort criteria.
$this->drupalGet('admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/sort/created');
$this->helperButtonHasLabel('edit-options-expose-button-button', t('Expose sort'));
- $this->assertNoFieldById('edit-options-expose-label', '', t('Make sure no label field is shown'));
+ $this->assertNoFieldById('edit-options-expose-label', '', 'Make sure no label field is shown');
// Click the Grouped Filters button.
$this->drupalGet('admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type');
@@ -140,7 +140,7 @@ class ExposedFormUITest extends UITestBase {
$edit["options[group_info][group_items][3][value][article]"] = TRUE;
$edit["options[group_info][group_items][3][value][page]"] = TRUE;
$this->drupalPost(NULL, $edit, t('Apply'));
- $this->assertRaw(t('The title is required if value for this item is defined.'), t('Group items should have a title'));
+ $this->assertRaw(t('The title is required if value for this item is defined.'), 'Group items should have a title');
// Un-expose the filter.
$this->drupalGet('admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type');
@@ -157,6 +157,6 @@ class ExposedFormUITest extends UITestBase {
$this->drupalPost('admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/sort/created', $edit, t('Expose sort'));
// Check the label of the expose button.
$this->helperButtonHasLabel('edit-options-expose-button-button', t('Hide sort'));
- $this->assertFieldById('edit-options-expose-label', '', t('Make sure a label field is shown'));
+ $this->assertFieldById('edit-options-expose-label', '', 'Make sure a label field is shown');
}
}