Problem/Motivation

Running:

./vendor/bin/phpunit -c core/

Will result in the following error:

PHP Fatal error:  Trait 'Drupal\field_group\Tests\FieldGroupTestTrait' not found in /web/modules/contrib/ds/tests/src/Functional/FieldGroupTest.php on line 14

Fatal error: Trait 'Drupal\field_group\Tests\FieldGroupTestTrait' not found in /web/modules/contrib/ds/tests/src/Functional/FieldGroupTest.php on line 14

Currently FieldGroupTest test is unable to find the FieldGroupTestTrait.

Proposed resolution

Fix namespace in FieldGroupTest.php so FieldGroupTestTrait can be be used.

CommentFileSizeAuthor
#2 running-phpunit-2947362-1.patch456 bytesroborew
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roborew created an issue. See original summary.

roborew’s picture

Edited the use statement to be:

use Drupal\Tests\field_group\Functional\FieldGroupTestTrait;

Fixes the issue.

darvanen’s picture

Status: Active » Reviewed & tested by the community

Yep, works well. RTBC.

  • swentel committed 401e055 on 8.x-3.x authored by roborew
    Issue #2947362 by roborew: Running phpunit test results in...
swentel’s picture

Status: Reviewed & tested by the community » Fixed

committed and pushed, thanks!

Status: Fixed » Closed (fixed)

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

jaydee1818’s picture

I'm still getting this error - patch doesn't seem to work