diff options
Diffstat (limited to 'plugins/broadcast/root/tests/Broadcast/MessageTest.php')
-rw-r--r-- | plugins/broadcast/root/tests/Broadcast/MessageTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/broadcast/root/tests/Broadcast/MessageTest.php b/plugins/broadcast/root/tests/Broadcast/MessageTest.php new file mode 100644 index 00000000..dd9e1cc3 --- /dev/null +++ b/plugins/broadcast/root/tests/Broadcast/MessageTest.php @@ -0,0 +1,24 @@ +<?php + +/** + * Spiral Framework. + * + * @license MIT + * @author Anton Titov (Wolfy-J) + */ + +declare(strict_types=1); + +namespace Spiral\Broadcast\Tests; + +use PHPUnit\Framework\TestCase; +use Spiral\Broadcast\Message; + +class MessageTest extends TestCase +{ + public function testSerialize(): void + { + $m = new Message('topic', ['hello' => 'world']); + $this->assertSame('{"topic":"topic","payload":{"hello":"world"}}', json_encode($m)); + } +} |