File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 44
55use Enqueue \Client \CommandSubscriberInterface ;
66use 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 ;
1010use Symfony \Component \Process \PhpExecutableFinder ;
1111use Symfony \Component \Process \Process ;
1212
13- final class RunCommandProcessor implements PsrProcessor , CommandSubscriberInterface
13+ final class RunCommandProcessor implements Processor , CommandSubscriberInterface
1414{
1515 /**
1616 * @var string
@@ -22,7 +22,7 @@ public function __construct(string $projectDir)
2222 $ this ->projectDir = $ projectDir ;
2323 }
2424
25- public function process (PsrMessage $ message , PsrContext $ context ): Result
25+ public function process (Message $ message , Context $ context ): Result
2626 {
2727 $ command = RunCommand::jsonUnserialize ($ message ->getBody ());
2828
Original file line number Diff line number Diff line change 88use Enqueue \Consumption \Result ;
99use Enqueue \Null \NullContext ;
1010use Enqueue \Null \NullMessage ;
11- use Interop \Queue \PsrMessage ;
11+ use Interop \Queue \Message ;
1212use PHPUnit \Framework \TestCase ;
1313
1414/**
@@ -20,15 +20,15 @@ public function testRunSimpleCommandAndReturnOutput()
2020 {
2121 $ runCommand = new RunCommand ('foo ' );
2222
23- $ psrMessage = new NullMessage (json_encode ($ runCommand ));
24- $ psrMessage ->setReplyTo ('aReplyToQueue ' );
23+ $ Message = new NullMessage (json_encode ($ runCommand ));
24+ $ Message ->setReplyTo ('aReplyToQueue ' );
2525
2626 $ processor = new RunCommandProcessor (__DIR__ );
2727
28- $ result = $ processor ->process ($ psrMessage , new NullContext ());
28+ $ result = $ processor ->process ($ Message , new NullContext ());
2929
3030 $ this ->assertInstanceOf (Result::class, $ result );
31- $ this ->assertInstanceOf (PsrMessage ::class, $ result ->getReply ());
31+ $ this ->assertInstanceOf (Message ::class, $ result ->getReply ());
3232
3333 $ replyMessage = $ result ->getReply ();
3434
Original file line number Diff line number Diff line change 55use Enqueue \AsyncCommand \Commands ;
66use Enqueue \AsyncCommand \RunCommandProcessor ;
77use Enqueue \Client \CommandSubscriberInterface ;
8- use Interop \Queue \PsrProcessor ;
8+ use Interop \Queue \Processor ;
99use PHPUnit \Framework \TestCase ;
1010
1111class RunCommandProcessorTest extends TestCase
@@ -14,7 +14,7 @@ public function testShouldImplementProcessorInterface()
1414 {
1515 $ rc = new \ReflectionClass (RunCommandProcessor::class);
1616
17- $ this ->assertTrue ($ rc ->implementsInterface (PsrProcessor ::class));
17+ $ this ->assertTrue ($ rc ->implementsInterface (Processor ::class));
1818 }
1919
2020 public function testShouldImplementCommandSubscriberInterfaceInterface ()
You can’t perform that action at this time.
0 commit comments