Problem/Motivation

As found in [#] some assertions in \Drupal\views\Tests\Plugin\DisplayPageTest::testPageRouterItems are never called as the views routes ids changed a while ago. Even if they were called, they are not accurate anymore so they would fail.

Proposed resolution

Fix the condition and the assertions.

Remaining tasks

  • Upload the patch
  • Wait until the testbot is happy
  • Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because a part of the test does not work as expected
Issue priority Normal because the test is just outdated but the tested code still works
Unfrozen changes Unfrozen because it only changes tests.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DuaelFr created an issue. See original summary.

DuaelFr’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.15 KB
Lendude’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, testbot happy.

Tested locally that without the fix, when you change the assertion to
$this->assertEqual($route->getDefault('_controller'), '!!SHOULD FAIL!!');
it still passes happily. So yeah, without the fix the assertions are never done.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: views-tests-fix-2575853-2.patch, failed testing.

DuaelFr’s picture

Unable to reproduce that test failure locally on HEAD.

Status: Needs work » Needs review
Lendude’s picture

Status: Needs review » Reviewed & tested by the community

random fails.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow, nice catch.

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 8971a86 on 8.0.x
    Issue #2575853 by DuaelFr, Lendude: Fix \Drupal\views\Tests\Plugin\...

Status: Fixed » Closed (fixed)

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