In php7
1) Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testSort
Failed asserting that two variables reference the same object.

/.../d8/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php:454

Similar to #2531258: Improve \Drupal\Tests\user\Unit\PermissionHandlerTest::testBuildPermissionsSortPerModule and #2533168: Fix BlockRepositoryTest the ConfigEntityBaseUnitTest relies on sort behavior that can differ in php engines.
http://3v4l.org/e6noO

This one passes through shear luck it seems. We're settings a property on the objects but the sort is calling the label method. The mocks don't work correctly for settings the label method. The last sort doesn't use the right sort method. Its pretty broken.

Lazy beta evaluation: Bug, Tests and PHP7 major so ok.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neclimdul’s picture

Status: Active » Needs review
FileSize
2.02 KB
Berdir’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -php7 +PHP 7.0 (duplicate)

Lazy beta evaluation: Bug, Tests and PHP7 major so ok.

+1

Confirmed the test fail, this fixes it.

The public weight thing is a bit weird, seems like what we should be doing these days is an interface + method for that, can imagine that doesn't work anymore in many cases because we made the properties protected? But that's what the implementation is doing now so makes sense to test that.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: fix-2533222-1.patch, failed testing.

Status: Needs work » Needs review

Berdir queued 1: fix-2533222-1.patch for re-testing.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Failed with "Fetch test patch: failed to retrieve [fix-2533222-1.patch] from [www.drupal.org]."

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 22d8e4b and pushed to 8.0.x. Thanks!

Yep we should open an issue about the weight thing and protection.

  • alexpott committed 22d8e4b on 8.0.x
    Issue #2533222 by neclimdul, Berdir: Fix ConfigEntityBaseUnitTest
    

Status: Fixed » Closed (fixed)

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