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
Comments
Comment #2
acbramley commentedComment #3
larowlanWill commit later in week too.
Comment #4
larowlanFixed, thanks