Пример #1
0
 public function testConnIsRemovedFromTopicOnClose()
 {
     $name = 'State Testing';
     list($topic, $attribute) = $this->topicProvider($name);
     $this->assertCount(1, $attribute->getValue($this->mngr));
     $this->mngr->onSubscribe($this->conn, $name);
     $this->mngr->onClose($this->conn);
     $this->assertFalse($topic->has($this->conn));
 }
Пример #2
0
 public function testConnIsRemovedFromTopicOnClose()
 {
     $name = 'State testing';
     $class = new \ReflectionClass('Ratchet\\Wamp\\TopicManager');
     $method = $class->getMethod('getTopic');
     $method->setAccessible(true);
     $topic = $method->invokeArgs($this->mngr, array($name));
     $this->mngr->onSubscribe($this->conn, $name);
     $this->mngr->onClose($this->conn);
     $this->assertFalse($topic->has($this->conn));
 }