diff --git a/core/modules/views/lib/Drupal/views/Tests/BasicTest.php b/core/modules/views/lib/Drupal/views/Tests/BasicTest.php index d66d30433537c090a9146918599fcd37ef2a8c0e..aef6a50d4e164ca5d1d031f7a8edec8590005e3a 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 @@ public function testSimpleResultSet() { $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 @@ public function testSimpleFiltering() { ); // 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 @@ public function testSimpleArgument() { ); // 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 @@ public function testSimpleArgument() { // 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 d6d946205645fcc594499e1afdd4f9a1f5dec0c9..813701ecb8496392680335a2279268c7f3e9702e 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 @@ public function testDateOrdering() { $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 2fabc212cf33cb55e6cb34db024638f47f845e64..c7745b57f7aa1cf7706bab975e10911c133a86ef 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 @@ public function testRandomOrdering() { $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 @@ public function testRandomOrdering() { // 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 @@ public function testRandomOrdering() { // 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 35c62db968f7dbe0f7d11ca9291afb0dbaf74898..b7012aeefb02391f1577e556c455eef678149ff8 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 @@ public function testNumericOrdering() { $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 @@ public function testNumericOrdering() { $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 @@ public function testStringOrdering() { $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 @@ public function testStringOrdering() { $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 d5c437504023c07965ecc2427ce30de4a1780610..fa80f077acd051461353867a3a2084a0e7c5d133 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 @@ function testAccessNone() { $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 f1da997230b46a698c312ed5061909e6218f150d..4dc8a5631045f7582deae3b7832b9a888d4464da 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 @@ function testTimeCaching() { $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 @@ function testTimeCaching() { $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 @@ function testNoneCaching() { $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 @@ function testNoneCaching() { $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 cbc8279ae0f2f656fc5c3d935ab6f17e0e9bde8b..75436c4f3d9652071d50edceff267773d181b4da 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 @@ public function testRenderNullPager() { $view->pager = NULL; $output = $view->render(); $output = drupal_render($output); - $this->assertEqual(preg_match('/