Submit
Path:
~
/
/
proc
/
self
/
root
/
opt
/
psa
/
admin
/
plib
/
vendor
/
plesk
/
ratchetphp
/
tests
/
unit
/
Server
/
File Content:
IoConnectionTest.php
<?php namespace Ratchet\Application\Server; use Ratchet\Server\IoConnection; /** * @covers Ratchet\Server\IoConnection */ class IoConnectionTest extends \PHPUnit\Framework\TestCase { protected $sock; protected $conn; public function setUp(): void { $this->sock = $this->createMock('\\React\\Socket\\ConnectionInterface'); $this->conn = new IoConnection($this->sock); } public function testCloseBubbles() { $this->sock->expects($this->once())->method('end'); $this->conn->close(); } public function testSendBubbles() { $msg = '6 hour rides are productive'; $this->sock->expects($this->once())->method('write')->with($msg); $this->conn->send($msg); } public function testSendReturnsSelf() { $this->assertSame($this->conn, $this->conn->send('fluent interface')); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
EchoServerTest.php
832 bytes
0644
IoConnectionTest.php
894 bytes
0644
IoServerTest.php
3474 bytes
0644
IpBlackListComponentTest.php
3547 bytes
0644
N4ST4R_ID | Naxtarrr