Skip to content

Commit c4abea5

Browse files
committed
Shared app client command
1 parent 7e2f082 commit c4abea5

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace ApiClients\Client\Pusher\CommandBus\Command;
4+
5+
use WyriHaximus\Tactician\CommandHandler\Annotations\Handler;
6+
7+
/**
8+
* @Handler("ApiClients\Client\Pusher\CommandBus\Handler\SharedAppClientHandler")
9+
*/
10+
final class SharedAppClientCommand
11+
{
12+
/**
13+
* @var string
14+
*/
15+
private $appId;
16+
17+
/**
18+
* SharedAppClientCommand constructor.
19+
* @param string $appId
20+
*/
21+
public function __construct($appId)
22+
{
23+
$this->appId = $appId;
24+
}
25+
26+
/**
27+
* @return string
28+
*/
29+
public function getAppId()
30+
{
31+
return $this->appId;
32+
}
33+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace ApiClients\Tests\Client\Pusher\CommandBus\Command;
4+
5+
use ApiClients\Client\Pusher\CommandBus\Command\SharedAppClientCommand;
6+
use ApiClients\Tools\TestUtilities\TestCase;
7+
8+
class SharedAppClientCommandTest extends TestCase
9+
{
10+
public function testGetApp()
11+
{
12+
$appId = uniqid('app-id-', true);
13+
$this->assertSame($appId, (new SharedAppClientCommand($appId))->getAppId());
14+
}
15+
}

0 commit comments

Comments
 (0)