X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews%2Ftests%2Fsrc%2FFunctional%2FHandler%2FFieldWebTest.php;fp=web%2Fcore%2Fmodules%2Fviews%2Ftests%2Fsrc%2FFunctional%2FHandler%2FFieldWebTest.php;h=816fce1f27bc35ad768360bfb5cec72e0f39d142;hp=a3646f0c0b38561baecc0069280baef4b5a9e95f;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/web/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php index a3646f0c0..816fce1f2 100644 --- a/web/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +++ b/web/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\views\Functional\Handler; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Render\RenderContext; use Drupal\Core\Url; @@ -340,7 +339,7 @@ class FieldWebTest extends ViewTestBase { $this->assertSubString($output, UrlHelper::encodePath('Drupal Has A Great Community')); unset($id_field->options['alter']['path_case']); - // Tests the linkclass setting and see whether it actually exists in the + // Tests the link_class setting and see whether it actually exists in the // output. $id_field->options['alter']['link_class'] = $class = $this->randomMachineName(); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($id_field, $row) { @@ -484,7 +483,7 @@ class FieldWebTest extends ViewTestBase { 'p', 'strong', 'em', - 'marquee' + 'marquee', ]; $this->assertEqual(array_keys($element_types), $expected_elements); @@ -556,7 +555,7 @@ class FieldWebTest extends ViewTestBase { // Tests for simple trimming by string length. $row->views_test_data_name = $this->randomMachineName(8); $name_field->options['alter']['max_length'] = 5; - $trimmed_name = Unicode::substr($row->views_test_data_name, 0, 5); + $trimmed_name = mb_substr($row->views_test_data_name, 0, 5); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field, $row) { return $name_field->advancedRender($row); @@ -581,28 +580,28 @@ class FieldWebTest extends ViewTestBase { [ 'value' => $random_text_8, 'trimmed_value' => '', - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string with two words which doesn't fit both into the limit. [ 'value' => $random_text_8 . ' ' . $random_text_8, 'trimmed_value' => '', - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string which contains of two words, of which only the first // fits into the limit. [ 'value' => $random_text_4 . ' ' . $random_text_8, 'trimmed_value' => $random_text_4, - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string which contains of two words, of which both fits into // the limit. [ 'value' => $random_text_2 . ' ' . $random_text_2, 'trimmed_value' => $random_text_2 . ' ' . $random_text_2, - 'trimmed' => FALSE - ] + 'trimmed' => FALSE, + ], ]; foreach ($tuples as $tuple) {