-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathFakeAdapter.php
More file actions
59 lines (48 loc) · 1.49 KB
/
Copy pathFakeAdapter.php
File metadata and controls
59 lines (48 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
declare(strict_types=1);
namespace Yiisoft\Queue\Amqp\Tests\Support;
use BackedEnum;
use LogicException;
use Yiisoft\Queue\Adapter\AdapterInterface;
use Yiisoft\Queue\Amqp\QueueProviderInterface;
use Yiisoft\Queue\Cli\LoopInterface;
use Yiisoft\Queue\Message\MessageInterface;
use Yiisoft\Queue\Message\MessageSerializerInterface;
use Yiisoft\Queue\MessageStatus;
final class FakeAdapter implements AdapterInterface
{
public function __construct(
private readonly QueueProviderInterface $queueProvider,
private readonly MessageSerializerInterface $serializer,
private readonly LoopInterface $loop,
) {
}
public function runExisting(callable $handlerCallback): void
{
throw new LogicException('Method not implemented');
}
public function status(int|string $id): MessageStatus
{
return MessageStatus::NOT_FOUND;
}
public function hasStatusSupport(): bool
{
return false;
}
public function push(MessageInterface $message): MessageInterface
{
throw new LogicException('Method not implemented');
}
public function subscribe(callable $handlerCallback): void
{
throw new LogicException('Method not implemented');
}
public function withChannel(BackedEnum|string $channel): AdapterInterface
{
throw new LogicException('Method not implemented');
}
public function getChannel(): string
{
throw new LogicException('Method not implemented');
}
}