Problem/Motivation

Running simpletest from the command line produces the following error due to the incorrect namespace in WorkbenchModerationSchemaTest

PHP Fatal error:  Class 'Drupal\Tests\workbench_moderation\Kernel\WorkbenchModerationSchemaTest' not found in /var/www/site/web/core/scripts/run-tests.sh on line 722
PHP Stack trace:
PHP   1. {main}() /var/www/site/web/core/scripts/run-tests.sh:0
PHP   2. simpletest_script_run_one_test() /var/www/site/web/core/scripts/run-tests.sh:58

Fatal error: Class 'Drupal\Tests\workbench_moderation\Kernel\WorkbenchModerationSchemaTest' not found in /var/www/site/web/core/scripts/run-tests.sh on line 722

Call Stack:
    0.0019     464632   1. {main}() /var/www/site/web/core/scripts/run-tests.sh:0
    4.8256   19409472   2. simpletest_script_run_one_test() /var/www/site/web/core/scripts/run-tests.sh:58

FATAL Drupal\Tests\workbench_moderation\Kernel\WorkbenchModerationSchemaTest: test runner returned a non-zero error code (255).

I assume this is because the test runner script gathers the tests based on directory, and attempts to include the expected namespaced class based off of the location. Since the namespace of this class is Drupal\workbench_moderation\Tests, it fails to include it.

Proposed resolution

Fix the namespace in the test file.

The command I'm running is:

 php ./core/scripts/run-tests.sh --sqlite /tmp/test.sqlite --dburl mysql://root:root@localhost/mysite --url http://mysite.local/ --module workbench_moderation
CommentFileSizeAuthor
#2 2709619-fix-test-namespace-2.patch485 bytesacbramley

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review
StatusFileSize
new485 bytes
larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Will commit later in week too.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thanks

Status: Fixed » Closed (fixed)

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