projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website]
/
web
/
core
/
modules
/
migrate
/
tests
/
src
/
Unit
/
process
/
MakeUniqueEntityFieldTest.php
diff --git
a/web/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php
b/web/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php
index 2f33e621e8b0c8d119f058c109708668dbaf78d8..9d3ab06da56ff42c75d1acd7701709453c9f012e 100644
(file)
--- a/
web/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php
+++ b/
web/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.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\MakeUniqueEntityField;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\migrate\Plugin\migrate\process\MakeUniqueEntityField;
-use Drupal\Component\Utility\Unicode;
/**
* @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MakeUniqueEntityField
/**
* @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MakeUniqueEntityField
@@
-18,7
+17,6
@@
class MakeUniqueEntityFieldTest extends MigrateProcessTestCase {
* The mock entity query.
*
* @var \Drupal\Core\Entity\Query\QueryInterface
* The mock entity query.
*
* @var \Drupal\Core\Entity\Query\QueryInterface
- * @var \Drupal\Core\Entity\Query\QueryFactory
*/
protected $entityQuery;
*/
protected $entityQuery;
@@
-77,7
+75,7
@@
class MakeUniqueEntityFieldTest extends MigrateProcessTestCase {
$this->entityQueryExpects($count);
$value = $this->randomMachineName(32);
$actual = $plugin->transform($value, $this->migrateExecutable, $this->row, 'testproperty');
$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);
}
$expected .= $count ? $postfix . $count : '';
$this->assertSame($expected, $actual);
}
@@
-165,7
+163,9
@@
class MakeUniqueEntityFieldTest extends MigrateProcessTestCase {
->will($this->returnValue($this->entityQuery));
$this->entityQuery->expects($this->exactly($count + 1))
->method('execute')
->will($this->returnValue($this->entityQuery));
$this->entityQuery->expects($this->exactly($count + 1))
->method('execute')
- ->will($this->returnCallback(function () use (&$count) { return $count--;}));
+ ->will($this->returnCallback(function () use (&$count) {
+ return $count--;
+ }));
}
/**
}
/**
@@
-196,7
+196,7
@@
class MakeUniqueEntityFieldTest extends MigrateProcessTestCase {
// Entity 'forums' is pre-existing, entity 'test_vocab' was migrated.
$this->idMap
// Entity 'forums' is pre-existing, entity 'test_vocab' was migrated.
$this->idMap
- ->method('lookupSourceI
D
')
+ ->method('lookupSourceI
d
')
->will($this->returnValueMap([
[['test_field' => 'forums'], FALSE],
[['test_field' => 'test_vocab'], ['source_id' => 42]],
->will($this->returnValueMap([
[['test_field' => 'forums'], FALSE],
[['test_field' => 'test_vocab'], ['source_id' => 42]],