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)); }
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)); }