1 | <?php |
||
21 | class BroadcastTest extends TestCase |
||
22 | { |
||
23 | use LoadTrait; |
||
24 | |||
25 | /** |
||
26 | * @var Broadcast |
||
27 | */ |
||
28 | private $broadcast; |
||
29 | |||
30 | /** |
||
31 | * Set up test. |
||
32 | */ |
||
33 | protected function setUp() |
||
39 | |||
40 | /** |
||
41 | * Test on. |
||
42 | * |
||
43 | * @throws \Exception |
||
44 | */ |
||
45 | public function testOn() |
||
51 | |||
52 | /** |
||
53 | * Test process. |
||
54 | */ |
||
55 | public function testProcess() |
||
71 | |||
72 | // /** |
||
73 | // */ |
||
74 | // public function testEmit() |
||
75 | // { |
||
76 | // $data = range(1, 10); |
||
77 | // |
||
78 | // $handler = $this->getMockBuilder([EventInterface::class, EventPublisherInterface::class])->getMock(); |
||
79 | // $handler |
||
80 | // ->expects($this->once()) |
||
81 | // ->method('setPayload') |
||
82 | // ->with($data); |
||
83 | // $handler |
||
84 | // ->expects($this->once()) |
||
85 | // ->method('fire'); |
||
86 | // |
||
87 | // $this->container->set(sprintf('socketio.%s', get_class($handler)), $handler); |
||
88 | // $this->broadcast->emit(get_class($handler), $data); |
||
89 | // } |
||
90 | |||
91 | // /** |
||
92 | // */ |
||
93 | // public function testChannels() |
||
94 | // { |
||
95 | // |
||
96 | // } |
||
97 | } |
||
98 |