Commit 2487ebb7 authored by heddn's avatar heddn Committed by heddn

Issue #3019796 by heddn, mikelutz: Run D.O. tests with deprecation notices enabled

parent da05acc2
......@@ -261,6 +261,11 @@ class EntityLookup extends ProcessPluginBase implements ContainerFactoryPluginIn
$query = $this->entityManager->getStorage($this->lookupEntityType)
->getQuery()
->condition($this->lookupValueKey, $value, $multiple ? 'IN' : NULL);
// Sqlite and possibly others returns data in a non-deterministic order.
// Make it deterministic.
if ($multiple) {
$query->sort($this->lookupValueKey, 'DESC');
}
if ($this->lookupBundleKey) {
$query->condition($this->lookupBundleKey, $this->lookupBundle);
......
......@@ -171,14 +171,14 @@ class EntityGenerateTest extends KernelTestBase implements MigrateMessageInterfa
foreach ($valueToCheck as $key => $expectedValue) {
if (empty($expectedValue)) {
if (!$entity->{$property}->isEmpty()) {
$this->assertTrue($entity->{$property}[0]->entity->$key->isEmpty(), "Expected value is empty but field $property.$key is not empty.");
$this->assertTrue($entity->{$property}[0]->entity->{$key}->isEmpty(), "Expected value is empty but field $property.$key is not empty.");
}
else {
$this->assertTrue($entity->{$property}->isEmpty(), "FOOBAR Expected value is empty but field $property is not empty.");
$this->assertTrue($entity->{$property}->isEmpty(), "Expected value is empty but field $property is not empty.");
}
}
elseif ($entity->{$property}->getValue()) {
$this->assertEquals($expectedValue, $entity->{$property}[$valueID]->entity->$key->value);
$this->assertEquals($expectedValue, $entity->get($property)->offsetGet($valueID)->entity->{$key}->value);
}
else {
$this->fail("Expected value: $expectedValue does not exist in $property.");
......@@ -192,7 +192,7 @@ class EntityGenerateTest extends KernelTestBase implements MigrateMessageInterfa
foreach ($value as $key => $expectedValue) {
if (empty($expectedValue)) {
if (!$entity->{$property}->isEmpty()) {
$this->assertTrue($entity->{$property}[0]->entity->$key->isEmpty(), "Expected value is empty but field $property.$key is not empty.");
$this->assertTrue($entity->{$property}[0]->entity->{$key}->isEmpty(), "Expected value is empty but field $property.$key is not empty.");
}
else {
$this->assertTrue($entity->{$property}->isEmpty(), "BINBAZ Expected value is empty but field $property is not empty.");
......
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