AwsCacheAdapterTest makes all unit tests fail

Created on 2 July 2021, over 3 years ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

We are seeing this issue pop up our CI when we run

phpunit {{ project_path }}/web/modules/custom --testsuite=unit --filter={{ our module prefix }}

PHPUnit is grabbing all available tests and filtering them for our own, but the AwsCacheAdapterTest cannot load because it doesn't extend the normal Drupal UnitTestCase.

PHP Fatal error: Uncaught Error: Class "PHPUnit_Framework_TestCase" not found in /builds/{{ project_path }}/drupal/web/modules/contrib/flysystem_s3/tests/src/Unit/AwsCacheAdapterTest.php:13

Steps to reproduce

Run phpunit unit tests on anything if flysystem_s3 is installed.

Proposed resolution

Have the test extend Drupal\Tests\UnitTestCase instead of the non existent PHPUnit_Framework_TestCase, remove the CacheInterface dependency on the AwsCacheAdapter.

See merge request.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States alexandersluiter

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024