public function testGetSubProtocolsGetFromApp() { $mock = $this->getMock('Ratchet\\Tests\\WebSocket\\Stub\\WsMessageComponentInterface'); $mock->expects($this->once())->method('getSubProtocols')->will($this->returnValue(array('hello', 'world'))); $comp = new SessionProvider($mock, new NullSessionHandler()); $this->assertGreaterThanOrEqual(2, count($comp->getSubProtocols())); }
public function testGetSubProtocolsGetFromApp() { $mock = new MockComponent(); $mock->protocols = array('hello', 'world'); $comp = new SessionProvider($mock, new NullSessionHandler()); $this->assertGreaterThanOrEqual(2, count($comp->getSubProtocols())); }