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.188.152.124
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
league /
glide /
tests /
Responses /
Delete
Unzip
Name
Size
Permission
Date
Action
PsrResponseFactoryTest.php
1.42
KB
-rw-r--r--
2020-11-05 09:00
Save
Rename
<?php namespace League\Glide\Responses; use Mockery; use PHPUnit\Framework\TestCase; class PsrResponseFactoryTest extends TestCase { public function testCreateInstance() { $response = Mockery::mock('Psr\Http\Message\ResponseInterface'); $streamCallback = function () { }; $this->assertInstanceOf( 'League\Glide\Responses\PsrResponseFactory', new PsrResponseFactory($response, $streamCallback) ); } public function testCreate() { $response = Mockery::mock('Psr\Http\Message\ResponseInterface', function ($mock) { $mock->shouldReceive('withBody')->andReturn($mock)->once(); $mock->shouldReceive('withHeader')->andReturn($mock)->times(4); }); $streamCallback = function ($stream) { return $stream; }; $cache = Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { $mock->shouldReceive('getMimetype')->andReturn('image/jpeg'); $mock->shouldReceive('getSize')->andReturn(0); $mock->shouldReceive('readStream')->andReturn( Mockery::mock('Psr\Http\Message\StreamInterface') ); }); $factory = new PsrResponseFactory($response, $streamCallback); $this->assertInstanceOf( 'Psr\Http\Message\ResponseInterface', $factory->create($cache, 'image.jpg') ); } }