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 : 3.140.254.100
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 Psr\Http\Message\StreamInterface; use RingCentral\Psr7; use RingCentral\Psr7\StreamDecoratorTrait; class Str extends StreamDecoratorTrait implements StreamInterface { } /** * @covers RingCentral\Psr7\StreamDecoratorTrait */ class StreamDecoratorTraitTest extends \PHPUnit_Framework_TestCase { private $a; private $b; private $c; public function setUp() { $this->c = fopen('php://temp', 'r+'); fwrite($this->c, 'foo'); fseek($this->c, 0); $this->a = Psr7\stream_for($this->c); $this->b = new Str($this->a); } public function testCatchesExceptionsWhenCastingToString() { $s = $this->getMockBuilder('Psr\Http\Message\StreamInterface') ->setMethods(array('read')) ->getMockForAbstractClass(); $s->expects($this->once()) ->method('read') ->will($this->throwException(new \Exception('foo'))); $msg = ''; set_error_handler(function ($errNo, $str) use (&$msg) { $msg = $str; }); echo new Str($s); restore_error_handler(); $this->assertContains('foo', $msg); } public function testToString() { $this->assertEquals('foo', (string)$this->b); } public function testHasSize() { $this->assertEquals(3, $this->b->getSize()); } public function testReads() { $this->assertEquals('foo', $this->b->read(10)); } public function testCheckMethods() { $this->assertEquals($this->a->isReadable(), $this->b->isReadable()); $this->assertEquals($this->a->isWritable(), $this->b->isWritable()); $this->assertEquals($this->a->isSeekable(), $this->b->isSeekable()); } public function testSeeksAndTells() { $this->b->seek(1); $this->assertEquals(1, $this->a->tell()); $this->assertEquals(1, $this->b->tell()); $this->b->seek(0); $this->assertEquals(0, $this->a->tell()); $this->assertEquals(0, $this->b->tell()); $this->b->seek(0, SEEK_END); $this->assertEquals(3, $this->a->tell()); $this->assertEquals(3, $this->b->tell()); } public function testGetsContents() { $this->assertEquals('foo', $this->b->getContents()); $this->assertEquals('', $this->b->getContents()); $this->b->seek(1); $this->assertEquals('oo', $this->b->getContents(1)); } public function testCloses() { $this->b->close(); $this->assertFalse(is_resource($this->c)); } public function testDetaches() { $this->b->detach(); $this->assertFalse($this->b->isReadable()); } public function testWrapsMetadata() { $this->assertSame($this->b->getMetadata(), $this->a->getMetadata()); $this->assertSame($this->b->getMetadata('uri'), $this->a->getMetadata('uri')); } public function testWrapsWrites() { $this->b->seek(0, SEEK_END); $this->b->write('foo'); $this->assertEquals('foofoo', (string)$this->a); } /** * @expectedException \UnexpectedValueException */ public function testThrowsWithInvalidGetter() { $this->b->foo; } }