Problem/Motivation

---- Drupal\Tests\ctools\Unit\VariantCollectionTraitTest ----


Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Fail      Other      phpunit-18.xml       0 Drupal\Tests\ctools\Unit\VariantCol
    PHPUnit Test failed to complete; Error: PHPUnit 8.5.8 by Sebastian Bergmann
    and contributors.
    
    Testing Drupal\Tests\ctools\Unit\VariantCollectionTraitTest
    ..F....                                                             7 / 7
    (100%)
    
    Time: 370 ms, Memory: 10.00 MB
    
    There was 1 failure:
    
    1) Drupal\Tests\ctools\Unit\VariantCollectionTraitTest::testGetVariantsSort
    Failed asserting that two arrays are identical.
    --- Expected
    +++ Actual
    @@ @@
     Array &0 (
    +    'foo' => 'foo'
         'bar' => 'bar'
    -    'foo' => 'foo'
     )
    
    /app/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:118
    /app/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:93
    /app/vendor/phpunit/phpunit/src/Framework/Assert.php:2887
    /app/vendor/phpunit/phpunit/src/Framework/Assert.php:1807
    /app/modules/ctools/tests/src/Unit/VariantCollectionTraitTest.php:77
    /app/vendor/phpunit/phpunit/src/Framework/TestResult.php:691
    /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php:597
    /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:627
    /app/vendor/phpunit/phpunit/src/TextUI/Command.php:204
    /app/vendor/phpunit/phpunit/src/TextUI/Command.php:163
    
    FAILURES!
    Tests: 7, Assertions: 19, Failures: 1.

Steps to reproduce

run:

php core/scripts/run-tests.sh --php /usr/local/bin/php --url http://example.lndo.site --dburl mysql://drupal8:drupal8@database/drupal8 --sqlite simpletest.sqlite --class lando php core/scripts/run-tests.sh --php /usr/local/bin/php --url http://example.lndo.site --dburl mysql://drupal9:drupal9@database/drupal9 --sqlite simpletest.sqlite --verbose  --class "Drupal\Tests\ctools\Unit\VariantCollectionTraitTest"

Comments

thalles created an issue. See original summary.

thalles’s picture

Status: Needs work » Needs review
StatusFileSize
new938 bytes

Follow a patch that fix the tests

joelpittet’s picture

Status: Needs review » Fixed

Thanks @thalles! committed to the dev branch.

Status: Fixed » Closed (fixed)

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

joelpittet’s picture

Reverted the : void change because it was introduced in 9.x and I want this branch to still support 8.x. Those changes need to be in the next branch