feat: tick planner, delivery job, scheduler and purge
Also: test uses disabled channels instead of deleting them (FK cascade); ChannelRegistry no longer final so tests can extend it (controller ruling). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BCrwHHnGCB5XH968Nxokqw
This commit is contained in:
22
core/tests/Support/FakeRegistry.php
Normal file
22
core/tests/Support/FakeRegistry.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Support;
|
||||
|
||||
use App\Channels\ChannelDriver;
|
||||
use App\Channels\ChannelRegistry;
|
||||
use App\Enums\ChannelType;
|
||||
use Illuminate\Container\Container;
|
||||
|
||||
final class FakeRegistry extends ChannelRegistry
|
||||
{
|
||||
/** @param array<string, ChannelDriver> $drivers keyed by ChannelType value */
|
||||
public function __construct(private readonly array $drivers)
|
||||
{
|
||||
parent::__construct(Container::getInstance());
|
||||
}
|
||||
|
||||
public function for(ChannelType $type): ChannelDriver
|
||||
{
|
||||
return $this->drivers[$type->value];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user