X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Ftests%2Fsrc%2FUnit%2Fprocess%2FDedupeEntityTest.php;fp=web%2Fcore%2Fmodules%2Fmigrate%2Ftests%2Fsrc%2FUnit%2Fprocess%2FDedupeEntityTest.php;h=6dd8795305a7cd56546fc9e97b8c8263f4a92571;hp=7b21eff351883e200ee9ff01c8a629bc0c701ded;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php b/web/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php index 7b21eff35..6dd879530 100644 --- a/web/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php +++ b/web/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php @@ -6,7 +6,6 @@ use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\Query\QueryInterface; use Drupal\migrate\Plugin\migrate\process\DedupeEntity; -use Drupal\Component\Utility\Unicode; /** * @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\DedupeEntity @@ -18,7 +17,7 @@ class DedupeEntityTest extends MigrateProcessTestCase { /** * The mock entity query. * - * @var \Drupal\Core\Entity\Query\QueryInterface|\Drupal\Core\Entity\Query\QueryFactory + * @var \Drupal\Core\Entity\Query\QueryInterface */ protected $entityQuery; @@ -77,7 +76,7 @@ class DedupeEntityTest extends MigrateProcessTestCase { $this->entityQueryExpects($count); $value = $this->randomMachineName(32); $actual = $plugin->transform($value, $this->migrateExecutable, $this->row, 'testproperty'); - $expected = Unicode::substr($value, $start, $length); + $expected = mb_substr($value, $start, $length); $expected .= $count ? $postfix . $count : ''; $this->assertSame($expected, $actual); } @@ -198,7 +197,7 @@ class DedupeEntityTest extends MigrateProcessTestCase { // Entity 'forums' is pre-existing, entity 'test_vocab' was migrated. $this->idMap - ->method('lookupSourceID') + ->method('lookupSourceId') ->will($this->returnValueMap([ [['test_field' => 'forums'], FALSE], [['test_field' => 'test_vocab'], ['source_id' => 42]],