Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 216.73.216.148
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
cboden /
ratchet /
tests /
unit /
Wamp /
Delete
Unzip
Name
Size
Permission
Date
Action
ServerProtocolTest.php
8.67
KB
-rw-r--r--
2017-12-12 09:00
TopicManagerTest.php
7.09
KB
-rw-r--r--
2017-12-12 09:00
TopicTest.php
5
KB
-rw-r--r--
2017-12-12 09:00
WampConnectionTest.php
2.26
KB
-rw-r--r--
2017-12-12 09:00
WampServerTest.php
1.52
KB
-rw-r--r--
2017-12-12 09:00
Save
Rename
<?php namespace Ratchet\Wamp; /** * @covers Ratchet\Wamp\WampConnection */ class WampConnectionTest extends \PHPUnit_Framework_TestCase { protected $conn; protected $mock; public function setUp() { $this->mock = $this->getMock('\\Ratchet\\ConnectionInterface'); $this->conn = new WampConnection($this->mock); } public function testCallResult() { $callId = uniqid(); $data = array('hello' => 'world', 'herp' => 'derp'); $this->mock->expects($this->once())->method('send')->with(json_encode(array(3, $callId, $data))); $this->conn->callResult($callId, $data); } public function testCallError() { $callId = uniqid(); $uri = 'http://example.com/end/point'; $this->mock->expects($this->once())->method('send')->with(json_encode(array(4, $callId, $uri, ''))); $this->conn->callError($callId, $uri); } public function testCallErrorWithTopic() { $callId = uniqid(); $uri = 'http://example.com/end/point'; $this->mock->expects($this->once())->method('send')->with(json_encode(array(4, $callId, $uri, ''))); $this->conn->callError($callId, new Topic($uri)); } public function testDetailedCallError() { $callId = uniqid(); $uri = 'http://example.com/end/point'; $desc = 'beep boop beep'; $detail = 'Error: Too much awesome'; $this->mock->expects($this->once())->method('send')->with(json_encode(array(4, $callId, $uri, $desc, $detail))); $this->conn->callError($callId, $uri, $desc, $detail); } public function testPrefix() { $shortOut = 'outgoing'; $longOut = 'http://example.com/outgoing'; $this->mock->expects($this->once())->method('send')->with(json_encode(array(1, $shortOut, $longOut))); $this->conn->prefix($shortOut, $longOut); } public function testGetUriWhenNoCurieGiven() { $uri = 'http://example.com/noshort'; $this->assertEquals($uri, $this->conn->getUri($uri)); } public function testClose() { $mock = $this->getMock('\\Ratchet\\ConnectionInterface'); $conn = new WampConnection($mock); $mock->expects($this->once())->method('close'); $conn->close(); } }