PHPUnit tests failing

Created on 20 November 2023, about 1 year ago
Updated 29 January 2024, 11 months ago

Problem/Motivation

PHPUnit tests were failing so they were disabled to allow GitLab CI to be committed with passing checks.

There were 2 failures:

1) Drupal\Tests\remote_stream_wrapper_widget\Functional\RemoteStreamWrapperWidgetTest::testBasicFunctionality
Failed asserting that 404 is identical to 200.

/builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
/builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
/builds/project/remote_stream_wrapper_widget/tests/src/Functional/RemoteStreamWrapperWidgetTest.php:106
/builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

2) Drupal\Tests\remote_stream_wrapper_widget\Functional\RemoteStreamWrapperWidgetTest::testRegression3043148
Failed asserting that 404 is identical to 200.

/builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
/builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
/builds/project/remote_stream_wrapper_widget/tests/src/Functional/RemoteStreamWrapperWidgetTest.php:125
/builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

FAILURES!
Tests: 2, Assertions: 18, Failures: 2.

Proposed resolution

Resolve failures.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States markdorison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @markdorison
  • Merge request !7Re-enable PHPUnit checks. β†’ (Open) created by markdorison
  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison
  • πŸ‡¬πŸ‡§United Kingdom 2dareis2do

    I have issue with tests as well. I think the solution may be to resolve the issue rather than to disable the tests. Problem looks similar to https://www.drupal.org/project/restui/issues/3310517 β†’

    i.e.

     - protected function setUp() {
     + protected function setUp(): void {
  • πŸ‡¬πŸ‡§United Kingdom 2dareis2do

    Hmm, I see for some reason the latest changes are not in the diff here https://git.drupalcode.org/project/remote_stream_wrapper_widget/-/merge_...
    ?

  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    Hmm, I see for some reason the latest changes are not in the diff here

    The changes so far in the MR are just re-enabling the tests so they will fail the test run. The work here is to resolve the two failures:

    There were 2 failures:
    
    1) Drupal\Tests\remote_stream_wrapper_widget\Functional\RemoteStreamWrapperWidgetTest::testBasicFunctionality
    Failed asserting that 404 is identical to 200.
    
    /builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
    /builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
    /builds/project/remote_stream_wrapper_widget/tests/src/Functional/RemoteStreamWrapperWidgetTest.php:106
    /builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    2) Drupal\Tests\remote_stream_wrapper_widget\Functional\RemoteStreamWrapperWidgetTest::testRegression3043148
    Failed asserting that 404 is identical to 200.
    
    /builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
    /builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
    /builds/project/remote_stream_wrapper_widget/tests/src/Functional/RemoteStreamWrapperWidgetTest.php:125
    /builds/project/remote_stream_wrapper_widget/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    FAILURES!
    Tests: 2, Assertions: 18, Failures: 2.
  • πŸ‡¬πŸ‡§United Kingdom 2dareis2do

    Error is worse than a failure

Production build 0.71.5 2024