Working on #1953408: Remove ArrayAccess BC layer from field config entities was found that cache tests are totally broken.
Thats caused that cardinality was taken from string not field, so 0 (zero) items generated

#1 drupal8.field-system.2087449-1.patch1.37 KBandypost
PASSED: [[SimpleTest]]: [MySQL] 58,930 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


andypost’s picture

Status: Active » Needs review
1.37 KB
PASSED: [[SimpleTest]]: [MySQL] 58,930 pass(es). View
amateescu’s picture

+++ b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php
@@ -282,7 +282,7 @@ function testFieldAttachCache() {
     $this->assertEqual($cache->data[$this->field_name_2][$langcode], $values, 'Cached: correct cache entry on load');

How about this one?

And why is it not failing if it's broken? :)

andypost’s picture

Because $string[abrakadabra] === 0
AND FieldTestBase::_generateTestFieldValues just saves 0 to wrong field, so presence of the entity unknown

webchick’s picture

Status: Needs review » Fixed

I didn't quite parse #3 and asked andypost for more details.

In!modules!field!lib!Drupal!field!Te... it's doing this:

 for ($i = 0; $i < $cardinality; $i++) {

Since $cardinality evaluates to 0, basically the loop is skipped.

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.