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 : 18.221.21.111
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp /
vendor /
react /
promise-stream /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
AllTest.php
2.9
KB
-rw-r--r--
2017-12-22 09:00
BufferTest.php
3.13
KB
-rw-r--r--
2017-12-22 09:00
CallableStub.php
112
B
-rw-r--r--
2017-12-22 09:00
FirstTest.php
2.6
KB
-rw-r--r--
2017-12-22 09:00
TestCase.php
2.11
KB
-rw-r--r--
2017-12-22 09:00
UnwrapReadableTest.php
7.84
KB
-rw-r--r--
2017-12-22 09:00
UnwrapWritableTest.php
9.7
KB
-rw-r--r--
2017-12-22 09:00
Save
Rename
<?php namespace React\Tests\Promise\Stream; use React\Promise\Stream; use React\Stream\ThroughStream; class AllTest extends TestCase { public function testClosedStreamResolvesWithEmptyBuffer() { $stream = new ThroughStream(); $stream->close(); $promise = Stream\all($stream); $this->expectPromiseResolveWith(array(), $promise); } public function testClosedWritableStreamResolvesWithEmptyBuffer() { $stream = new ThroughStream(); $stream->close(); $promise = Stream\all($stream); $this->expectPromiseResolveWith(array(), $promise); } public function testPendingStreamWillNotResolve() { $stream = new ThroughStream(); $promise = Stream\all($stream); $promise->then($this->expectCallableNever(), $this->expectCallableNever()); } public function testClosingStreamResolvesWithEmptyBuffer() { $stream = new ThroughStream(); $promise = Stream\all($stream); $stream->close(); $this->expectPromiseResolveWith(array(), $promise); } public function testClosingWritableStreamResolvesWithEmptyBuffer() { $stream = new ThroughStream(); $promise = Stream\all($stream); $stream->close(); $this->expectPromiseResolveWith(array(), $promise); } public function testEmittingDataOnStreamResolvesWithArrayOfData() { $stream = new ThroughStream(); $promise = Stream\all($stream); $stream->emit('data', array('hello', $stream)); $stream->emit('data', array('world', $stream)); $stream->close(); $this->expectPromiseResolveWith(array('hello', 'world'), $promise); } public function testEmittingCustomEventOnStreamResolvesWithArrayOfCustomEventData() { $stream = new ThroughStream(); $promise = Stream\all($stream, 'a'); $stream->emit('a', array('hello')); $stream->emit('b', array('ignored')); $stream->emit('a'); $stream->close(); $this->expectPromiseResolveWith(array('hello', null), $promise); } public function testEmittingErrorOnStreamRejects() { $stream = new ThroughStream(); $promise = Stream\all($stream); $stream->emit('error', array(new \RuntimeException('test'))); $this->expectPromiseReject($promise); } public function testEmittingErrorAfterEmittingDataOnStreamRejects() { $stream = new ThroughStream(); $promise = Stream\all($stream); $stream->emit('data', array('hello', $stream)); $stream->emit('error', array(new \RuntimeException('test'))); $this->expectPromiseReject($promise); } public function testCancelPendingStreamWillReject() { $stream = new ThroughStream(); $promise = Stream\all($stream); $promise->cancel(); $this->expectPromiseReject($promise); } }