_server = new Server(new Socket()); } public function testServerHasServerInterface() { $constraint = $this->isInstanceOf('\\Ratchet\\ServerInterface'); $this->assertThat($this->_server, $constraint); } public function testServerCanNotRunWithoutApplication() { $this->setExpectedException('\\RuntimeException'); $this->_server->run(); } public function testAttatchedApplicationIsSet() { $app = new TestApp(); $this->_server->attatchApplication($app); $this->assertAttributeEquals($app, '_app', $this->_server); } }