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 /
helpers /
Ratchet /
Delete
Unzip
Name
Size
Permission
Date
Action
Mock
[ DIR ]
drwxr-xr-x
2017-12-12 09:00
Wamp
[ DIR ]
drwxr-xr-x
2017-12-12 09:00
WebSocket
[ DIR ]
drwxr-xr-x
2017-12-12 09:00
AbstractMessageComponentTestCase.php
1.73
KB
-rw-r--r--
2017-12-12 09:00
NullComponent.php
966
B
-rw-r--r--
2017-12-12 09:00
Save
Rename
<?php namespace Ratchet; abstract class AbstractMessageComponentTestCase extends \PHPUnit_Framework_TestCase { protected $_app; protected $_serv; protected $_conn; abstract public function getConnectionClassString(); abstract public function getDecoratorClassString(); abstract public function getComponentClassString(); public function setUp() { $this->_app = $this->getMock($this->getComponentClassString()); $decorator = $this->getDecoratorClassString(); $this->_serv = new $decorator($this->_app); $this->_conn = $this->getMock('\Ratchet\ConnectionInterface'); $this->doOpen($this->_conn); } protected function doOpen($conn) { $this->_serv->onOpen($conn); } public function isExpectedConnection() { return new \PHPUnit_Framework_Constraint_IsInstanceOf($this->getConnectionClassString()); } public function testOpen() { $this->_app->expects($this->once())->method('onOpen')->with($this->isExpectedConnection()); $this->doOpen($this->getMock('\Ratchet\ConnectionInterface')); } public function testOnClose() { $this->_app->expects($this->once())->method('onClose')->with($this->isExpectedConnection()); $this->_serv->onClose($this->_conn); } public function testOnError() { $e = new \Exception('Whoops!'); $this->_app->expects($this->once())->method('onError')->with($this->isExpectedConnection(), $e); $this->_serv->onError($this->_conn, $e); } public function passthroughMessageTest($value) { $this->_app->expects($this->once())->method('onMessage')->with($this->isExpectedConnection(), $value); $this->_serv->onMessage($this->_conn, $value); } }