Commit 75f9cfcb authored by anon's avatar anon Committed by anon

Issue #3012733 by anon: Use mb_* functions instead of Unicode::* methods

parent 1084887a
......@@ -2,7 +2,6 @@
namespace Drupal\linkit\Controller;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\linkit\SuggestionManager;
......@@ -77,7 +76,7 @@ class AutocompleteController implements ContainerInjectionInterface {
$this->linkitProfile = $this->linkitProfileStorage->load($linkit_profile_id);
$string = $request->query->get('q');
$suggestionCollection = $this->suggestionManager->getSuggestions($this->linkitProfile, Unicode::strtolower($string));
$suggestionCollection = $this->suggestionManager->getSuggestions($this->linkitProfile, mb_strtolower($string));
/*
* If there are no suggestions from the matcher plugins, we have to add a
......
......@@ -2,7 +2,6 @@
namespace Drupal\linkit\Tests;
use Drupal\Component\Utility\Unicode;
use Drupal\linkit\Entity\Profile;
/**
......@@ -29,7 +28,7 @@ trait ProfileCreationTrait {
protected function createProfile(array $settings = []) {
// Populate defaults array.
$settings += [
'id' => Unicode::strtolower($this->randomMachineName()),
'id' => mb_strtolower($this->randomMachineName()),
'label' => $this->randomMachineName(),
];
......
......@@ -2,7 +2,6 @@
namespace Drupal\Tests\linkit\Functional;
use Drupal\Component\Utility\Unicode;
use Drupal\linkit\Tests\ProfileCreationTrait;
/**
......@@ -62,8 +61,8 @@ class ProfileAdminTest extends LinkitBrowserTestBase {
// Create a profile.
$edit = [];
$edit['label'] = Unicode::strtolower($this->randomMachineName());
$edit['id'] = Unicode::strtolower($this->randomMachineName());
$edit['label'] = mb_strtolower($this->randomMachineName());
$edit['id'] = mb_strtolower($this->randomMachineName());
$edit['description'] = $this->randomMachineName(16);
$this->submitForm($edit, t('Save and manage matchers'));
......
......@@ -5,7 +5,6 @@ namespace Drupal\Tests\linkit\Kernel;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\Unicode;
use Drupal\entity_test\Entity\EntityTest;
use Drupal\entity_test\Entity\EntityTestMul;
use Drupal\language\Entity\ConfigurableLanguage;
......@@ -221,7 +220,7 @@ class LinkitAutocompleteTest extends LinkitKernelTestBase {
protected function createProfile(array $settings = []) {
// Populate defaults array.
$settings += [
'id' => Unicode::strtolower($this->randomMachineName()),
'id' => mb_strtolower($this->randomMachineName()),
'label' => $this->randomMachineName(),
];
......
......@@ -51,7 +51,7 @@ abstract class LinkitKernelTestBase extends KernelTestBase {
if ($permissions) {
// Create a new role and apply permissions to it.
$role = Role::create([
'id' => strtolower($this->randomMachineName(8)),
'id' => mb_strtolower($this->randomMachineName(8)),
'label' => $this->randomMachineName(8),
]);
$role->save();
......
......@@ -2,7 +2,6 @@
namespace Drupal\Tests\linkit\Kernel\Matchers;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Language\LanguageInterface;
use Drupal\taxonomy\VocabularyInterface;
use Drupal\Tests\linkit\Kernel\LinkitKernelTestBase;
......@@ -118,7 +117,7 @@ class TermMatcherTest extends LinkitKernelTestBase {
$vocabulary = $vocabularyStorage->create([
'name' => $name,
'description' => $name,
'vid' => Unicode::strtolower($name),
'vid' => mb_strtolower($name),
'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
]);
$vocabulary->save();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment