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.138.105.128
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 /
Signatures /
Delete
Unzip
Name
Size
Permission
Date
Action
SignatureFactoryTest.php
276
B
-rw-r--r--
2020-11-05 09:00
SignatureTest.php
2.3
KB
-rw-r--r--
2020-11-05 09:00
Save
Rename
<?php namespace League\Glide\Signatures; use League\Glide\Signatures\SignatureException; use PHPUnit\Framework\TestCase; class SignatureTest extends TestCase { private $httpSignature; public function setUp(): void { $this->httpSignature = new Signature('example'); } public function testCreateInstance() { $this->assertInstanceOf('League\Glide\Signatures\Signature', $this->httpSignature); } public function testAddSignature() { $this->assertEquals( ['w' => '100', 's' => '9978a40f1fc75fa64ac92ea9baf16ff3'], $this->httpSignature->addSignature('image.jpg', ['w' => '100']) ); } public function testAddSignatureWithExistingSignature() { $this->assertEquals( ['w' => '100', 's' => '9978a40f1fc75fa64ac92ea9baf16ff3'], $this->httpSignature->addSignature('image.jpg', ['w' => '100', 's' => 'existing']) ); } public function testValidateRequest() { $this->assertNull( $this->httpSignature->validateRequest('image.jpg', [ 'w' => '100', 's' => '9978a40f1fc75fa64ac92ea9baf16ff3', ]) ); } public function testValidateRequestWithLeadingSlash() { $this->assertNull( $this->httpSignature->validateRequest('/image.jpg', [ 'w' => '100', 's' => '9978a40f1fc75fa64ac92ea9baf16ff3', ]) ); } public function testValidateRequestWithMissingSignature() { $this->expectException(SignatureException::class); $this->expectExceptionMessage('Signature is missing.'); $this->httpSignature->validateRequest('image.jpg', [ 'w' => '100', ]); } public function testValidateRequestWithInvalidSignature() { $this->expectException(SignatureException::class); $this->expectExceptionMessage('Signature is not valid.'); $this->httpSignature->validateRequest('image.jpg', [ 'w' => '100', 's' => 'invalid', ]); } public function testGenerateSignature() { $this->assertEquals( '9978a40f1fc75fa64ac92ea9baf16ff3', $this->httpSignature->generateSignature('image.jpg', ['w' => '100']) ); } }