File tree 3 files changed +12
-12
lines changed
3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \Client \CommandSubscriberInterface ;
6
6
use Enqueue \Consumption \Result ;
7
- use Interop \Queue \PsrContext ;
8
- use Interop \Queue \PsrMessage ;
9
- use Interop \Queue \PsrProcessor ;
7
+ use Interop \Queue \Context ;
8
+ use Interop \Queue \Message ;
9
+ use Interop \Queue \Processor ;
10
10
use Symfony \Component \Process \PhpExecutableFinder ;
11
11
use Symfony \Component \Process \Process ;
12
12
13
- final class RunCommandProcessor implements PsrProcessor , CommandSubscriberInterface
13
+ final class RunCommandProcessor implements Processor , CommandSubscriberInterface
14
14
{
15
15
/**
16
16
* @var string
@@ -22,7 +22,7 @@ public function __construct(string $projectDir)
22
22
$ this ->projectDir = $ projectDir ;
23
23
}
24
24
25
- public function process (PsrMessage $ message , PsrContext $ context ): Result
25
+ public function process (Message $ message , Context $ context ): Result
26
26
{
27
27
$ command = RunCommand::jsonUnserialize ($ message ->getBody ());
28
28
Original file line number Diff line number Diff line change 8
8
use Enqueue \Consumption \Result ;
9
9
use Enqueue \Null \NullContext ;
10
10
use Enqueue \Null \NullMessage ;
11
- use Interop \Queue \PsrMessage ;
11
+ use Interop \Queue \Message ;
12
12
use PHPUnit \Framework \TestCase ;
13
13
14
14
/**
@@ -20,15 +20,15 @@ public function testRunSimpleCommandAndReturnOutput()
20
20
{
21
21
$ runCommand = new RunCommand ('foo ' );
22
22
23
- $ psrMessage = new NullMessage (json_encode ($ runCommand ));
24
- $ psrMessage ->setReplyTo ('aReplyToQueue ' );
23
+ $ Message = new NullMessage (json_encode ($ runCommand ));
24
+ $ Message ->setReplyTo ('aReplyToQueue ' );
25
25
26
26
$ processor = new RunCommandProcessor (__DIR__ );
27
27
28
- $ result = $ processor ->process ($ psrMessage , new NullContext ());
28
+ $ result = $ processor ->process ($ Message , new NullContext ());
29
29
30
30
$ this ->assertInstanceOf (Result::class, $ result );
31
- $ this ->assertInstanceOf (PsrMessage ::class, $ result ->getReply ());
31
+ $ this ->assertInstanceOf (Message ::class, $ result ->getReply ());
32
32
33
33
$ replyMessage = $ result ->getReply ();
34
34
Original file line number Diff line number Diff line change 5
5
use Enqueue \AsyncCommand \Commands ;
6
6
use Enqueue \AsyncCommand \RunCommandProcessor ;
7
7
use Enqueue \Client \CommandSubscriberInterface ;
8
- use Interop \Queue \PsrProcessor ;
8
+ use Interop \Queue \Processor ;
9
9
use PHPUnit \Framework \TestCase ;
10
10
11
11
class RunCommandProcessorTest extends TestCase
@@ -14,7 +14,7 @@ public function testShouldImplementProcessorInterface()
14
14
{
15
15
$ rc = new \ReflectionClass (RunCommandProcessor::class);
16
16
17
- $ this ->assertTrue ($ rc ->implementsInterface (PsrProcessor ::class));
17
+ $ this ->assertTrue ($ rc ->implementsInterface (Processor ::class));
18
18
}
19
19
20
20
public function testShouldImplementCommandSubscriberInterfaceInterface ()
You can’t perform that action at this time.
0 commit comments