Problem/Motivation

The testGetArgument() is run with the first data set multiple times.

Proposed resolution

Fix providerGetArgument().

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lendude’s picture

Nice catch. And it's not just that the tests are never run, the tests are bugged when you do run them.

But instead of re-using $single, wouldn't it be easier to just add it straight to $data? Less chance of old data being reused. Added a patch that goes that route.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +rc eligible

Ups :)

RC eligible because there are just test changes.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed ec438eb and pushed to 8.0.x. Thanks!

phpunit modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php --tap
TAP version 13
ok 1 - Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument with data set #0 (array('test'), Symfony\Component\HttpFoundation\Request Object (...), 'data')
ok 2 - Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument with data set #1 (array('test', 'and'), Symfony\Component\HttpFoundation\Request Object (...), 'data1,data2')
ok 3 - Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument with data set #2 (array('test', 'or'), Symfony\Component\HttpFoundation\Request Object (...), 'data1+data2')
ok 4 - Drupal\Tests\views\Unit\Plugin\argument_default\QueryParameterTest::testGetArgument with data set #3 (array('test', 'blub'), Symfony\Component\HttpFoundation\Request Object (...), 'blub')
1..4

This looks much better.. nice catch.

  • alexpott committed ec438eb on 8.0.x
    Issue #2501635 by olli, Lendude: Fix QueryParameterTest
    

  • alexpott committed ec438eb on 8.1.x
    Issue #2501635 by olli, Lendude: Fix QueryParameterTest
    

Status: Fixed » Closed (fixed)

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