You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunctionsetUp(SapphireTest$test)
{
// Prepare queued jobs related functionality for unit test run// Disable queue logging
Injector::inst()->registerService(newQueuedJobsTest_Handler(), QueuedJobHandler::class);
// Disable special actions of the queue service
Config::modify()->set(QueuedJobService::class, 'use_shutdown_function', false);
// It seems Injector doesn't cover all cases so we force-inject a test service which is suitable for unit tests
Injector::inst()->registerService(newQueuedJobsTestService(), QueuedJobService::class);
SiteTreePublishingEngine::setQueueService(QueuedJobService::singleton());
}
QueuedJobsTest_Handler is a test class from the QueuedJobs module, and QueuedJobsTestService is a test class from this module. This means they're not available unless you composer install --prefer-source.
Is this the expected behaviour?
The text was updated successfully, but these errors were encountered:
Nice find @chrispenny , we should add class_exists() check in there and bail out if these classes are not available. This feature is meant to be used only for running tests within this module so an immediate project level fix would be to simply remove it by configuration if it's causing issues in your project (note that the test state had a named key in the config so you can just set it to null).
A new configuration has been added in
5.1
.QueuedJobsTest_Handler
is atest
class from the QueuedJobs module, andQueuedJobsTestService
is atest
class from this module. This means they're not available unless youcomposer install --prefer-source
.Is this the expected behaviour?
The text was updated successfully, but these errors were encountered: