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 /
Manipulators /
Delete
Unzip
Name
Size
Permission
Date
Action
Helpers
[ DIR ]
drwxr-xr-x
2020-11-05 09:00
BackgroundTest.php
1.27
KB
-rw-r--r--
2020-11-05 09:00
BlurTest.php
1.38
KB
-rw-r--r--
2020-11-05 09:00
BorderTest.php
3.98
KB
-rw-r--r--
2020-11-05 09:00
BrightnessTest.php
1.43
KB
-rw-r--r--
2020-11-05 09:00
ContrastTest.php
1.41
KB
-rw-r--r--
2020-11-05 09:00
CropTest.php
2.8
KB
-rw-r--r--
2020-11-05 09:00
EncodeTest.php
5.64
KB
-rw-r--r--
2020-11-05 09:00
FilterTest.php
2.32
KB
-rw-r--r--
2020-11-05 09:00
FlipTest.php
1.26
KB
-rw-r--r--
2020-11-05 09:00
GammaTest.php
1.57
KB
-rw-r--r--
2020-11-05 09:00
OrientationTest.php
1.88
KB
-rw-r--r--
2020-11-05 09:00
PixelateTest.php
1.43
KB
-rw-r--r--
2020-11-05 09:00
SharpenTest.php
1.42
KB
-rw-r--r--
2020-11-05 09:00
SizeTest.php
10.42
KB
-rw-r--r--
2020-11-05 09:00
WatermarkTest.php
9.61
KB
-rw-r--r--
2020-11-05 09:00
Save
Rename
<?php namespace League\Glide\Manipulators; use Mockery; use PHPUnit\Framework\TestCase; class BorderTest extends TestCase { private $manipulator; public function tearDown(): void { Mockery::close(); } public function testCreateInstance() { $this->assertInstanceOf('League\Glide\Manipulators\Border', new Border()); } public function testGetBorder() { $image = Mockery::mock('Intervention\Image\Image'); $border = new Border(); $this->assertNull($border->getBorder($image)); $this->assertSame( [10.0, 'rgba(0, 0, 0, 1)', 'overlay'], $border->setParams(['border' => '10,black'])->getBorder($image) ); } public function testGetInvalidBorder() { $image = Mockery::mock('Intervention\Image\Image'); $border = new Border(); $this->assertNull( $border->setParams(['border' => '0,black'])->getBorder($image) ); } public function testGetWidth() { $image = Mockery::mock('Intervention\Image\Image'); $border = new Border(); $this->assertSame(100.0, $border->getWidth($image, 1, '100')); } public function testGetColor() { $border = new Border(); $this->assertSame('rgba(0, 0, 0, 1)', $border->getColor('black')); } public function testGetMethod() { $border = new Border(); $this->assertSame('expand', $border->getMethod('expand')); $this->assertSame('shrink', $border->getMethod('shrink')); $this->assertSame('overlay', $border->getMethod('overlay')); $this->assertSame('overlay', $border->getMethod('invalid')); } public function testGetDpr() { $border = new Border(); $this->assertSame(1.0, $border->setParams(['dpr' => 'invalid'])->getDpr()); $this->assertSame(1.0, $border->setParams(['dpr' => '-1'])->getDpr()); $this->assertSame(1.0, $border->setParams(['dpr' => '9'])->getDpr()); $this->assertSame(2.0, $border->setParams(['dpr' => '2'])->getDpr()); } public function testRunWithNoBorder() { $image = Mockery::mock('Intervention\Image\Image'); $border = new Border(); $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); } public function testRunOverlay() { $image = Mockery::mock('Intervention\Image\Image', function ($mock) { $mock->shouldReceive('width')->andReturn(100)->once(); $mock->shouldReceive('height')->andReturn(100)->once(); $mock->shouldReceive('rectangle')->with(5, 5, 95, 95, Mockery::on(function ($closure) { return true; }))->andReturn($mock)->once(); }); $border = new Border(); $border->setParams(['border' => '10,5000,overlay']); $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); } public function testRunShrink() { $image = Mockery::mock('Intervention\Image\Image', function ($mock) { $mock->shouldReceive('width')->andReturn(100)->once(); $mock->shouldReceive('height')->andReturn(100)->once(); $mock->shouldReceive('resize')->with(80, 80)->andReturn($mock)->once(); $mock->shouldReceive('resizeCanvas')->with(20, 20, 'center', true, 'rgba(0, 0, 0, 0.5)')->andReturn($mock)->once(); }); $border = new Border(); $border->setParams(['border' => '10,5000,shrink']); $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); } public function testRunExpand() { $image = Mockery::mock('Intervention\Image\Image', function ($mock) { $mock->shouldReceive('resizeCanvas')->with(20, 20, 'center', true, 'rgba(0, 0, 0, 0.5)')->andReturn($mock)->once(); }); $border = new Border(); $border->setParams(['border' => '10,5000,expand']); $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); } }