ヤミRoot VoidGate
User / IP
:
216.73.216.110
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
willdurand
/
negotiation
/
tests
/
Negotiation
/
Tests
/
Viewing: EncodingNegotiatorTest.php
<?php namespace Negotiation\Tests; use Negotiation\EncodingNegotiator; class EncodingNegotiatorTest extends TestCase { /** * @var EncodingNegotiator */ private $negotiator; protected function setUp() { $this->negotiator = new EncodingNegotiator(); } public function testGetBestReturnsNullWithUnmatchedHeader() { $this->assertNull($this->negotiator->getBest('foo, bar, yo', array('baz'))); } /** * @dataProvider dataProviderForTestGetBest */ public function testGetBest($accept, $priorities, $expected) { $accept = $this->negotiator->getBest($accept, $priorities); if (null === $accept) { $this->assertNull($expected); } else { $this->assertInstanceOf('Negotiation\AcceptEncoding', $accept); $this->assertEquals($expected, $accept->getValue()); } } public static function dataProviderForTestGetBest() { return array( array('gzip;q=1.0, identity; q=0.5, *;q=0', array('identity'), 'identity'), array('gzip;q=0.5, identity; q=0.5, *;q=0.7', array('bzip', 'foo'), 'bzip'), array('gzip;q=0.7, identity; q=0.5, *;q=0.7', array('gzip', 'foo'), 'gzip'), # Quality of source factors array('gzip;q=0.7,identity', array('identity;q=0.5', 'gzip;q=0.9'), 'gzip;q=0.9'), ); } public function testGetBestRespectsQualityOfSource() { $accept = $this->negotiator->getBest('gzip;q=0.7,identity', array('identity;q=0.5', 'gzip;q=0.9')); $this->assertInstanceOf('Negotiation\AcceptEncoding', $accept); $this->assertEquals('gzip', $accept->getType()); } /** * @dataProvider dataProviderForTestParseAcceptHeader */ public function testParseAcceptHeader($header, $expected) { $accepts = $this->call_private_method('Negotiation\Negotiator', 'parseHeader', $this->negotiator, array($header)); $this->assertSame($expected, $accepts); } public static function dataProviderForTestParseAcceptHeader() { return array( array('gzip,deflate,sdch', array('gzip', 'deflate', 'sdch')), array("gzip, deflate\t,sdch", array('gzip', 'deflate', 'sdch')), array('gzip;q=1.0, identity; q=0.5, *;q=0', array('gzip;q=1.0', 'identity; q=0.5', '*;q=0')), ); } }
Coded With 💗 by
0x6ick