File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace ApiClients \Tests \Supervisord \CommandBus \Handler ;
4+
5+ use ApiClients \Client \Supervisord \CommandBus \Command \VersionCommand ;
6+ use ApiClients \Client \Supervisord \CommandBus \Handler \VersionHandler ;
7+ use ApiClients \Tools \Services \XmlRpc \XmlRpcService ;
8+ use ApiClients \Tools \TestUtilities \TestCase ;
9+ use function React \Promise \resolve ;
10+
11+ final class VersionHandlerTest extends TestCase
12+ {
13+ public function testCommand ()
14+ {
15+ $ service = $ this ->prophesize (XmlRpcService::class);
16+ $ service ->call ('supervisor.getSupervisorVersion ' )->shouldBeCalled ()->willReturn (resolve ('3.3.3 ' ));
17+
18+ $ handler = new VersionHandler ($ service ->reveal ());
19+ $ version = $ this ->await ($ handler ->handle (new VersionCommand ()));
20+
21+ self ::assertSame ('3.3.3 ' , $ version );
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments