Found while clearing the quarantined test groups (#14).
php/tests/Feature/Jobs/BatchContentGenerationTest.php, test does not dispatch any ProcessContentTask when collection is empty, never calls BatchContentGeneration. It builds its own empty collection, runs its own copy of the early-return branch, and asserts on that:
$emptyTasks = collect([]);
if ($emptyTasks->isEmpty()) {
// Simulates handle() early return
Log::info('BatchContentGeneration: No normal priority tasks to process');
} else {
foreach ($emptyTasks as $task) {
ProcessContentTask::dispatch($task);
}
}
Queue::assertNothingPushed();
It passes whatever handle() does, including if handle() is deleted. It is a test of the test.
The sibling test immediately above it (logs an info message when no tasks are found) now exercises the real path against a real content_tasks table after #14, so the coverage is genuinely there. This one should either be deleted as redundant, or rewritten to assert Queue::assertNothingPushed() after a real handle() call on the empty table.
Found while clearing the quarantined test groups (#14).
php/tests/Feature/Jobs/BatchContentGenerationTest.php, testdoes not dispatch any ProcessContentTask when collection is empty, never callsBatchContentGeneration. It builds its own empty collection, runs its own copy of the early-return branch, and asserts on that:It passes whatever
handle()does, including ifhandle()is deleted. It is a test of the test.The sibling test immediately above it (
logs an info message when no tasks are found) now exercises the real path against a realcontent_taskstable after #14, so the coverage is genuinely there. This one should either be deleted as redundant, or rewritten to assertQueue::assertNothingPushed()after a realhandle()call on the empty table.