One Hat Cyber Team
Your IP:
216.73.216.102
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
public_html
/
assets
/
images
/
Edit File:
Test.tar
Constraint/ResponseStatusCodeSame.php 0000644 00000002262 15107366341 0014014 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Response; final class ResponseStatusCodeSame extends Constraint { private int $statusCode; public function __construct(int $statusCode) { $this->statusCode = $statusCode; } public function toString(): string { return 'status code is '.$this->statusCode; } /** * @param Response $response */ protected function matches($response): bool { return $this->statusCode === $response->getStatusCode(); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } /** * @param Response $response */ protected function additionalFailureDescription($response): string { return (string) $response; } } Constraint/RequestAttributeValueSame.php 0000644 00000002150 15107366341 0014524 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Request; final class RequestAttributeValueSame extends Constraint { private string $name; private string $value; public function __construct(string $name, string $value) { $this->name = $name; $this->value = $value; } public function toString(): string { return sprintf('has attribute "%s" with value "%s"', $this->name, $this->value); } /** * @param Request $request */ protected function matches($request): bool { return $this->value === $request->attributes->get($this->name); } /** * @param Request $request */ protected function failureDescription($request): string { return 'the Request '.$this->toString(); } } Constraint/ResponseCookieValueSame.php 0000644 00000004016 15107366341 0014143 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Response; final class ResponseCookieValueSame extends Constraint { private string $name; private string $value; private string $path; private ?string $domain; public function __construct(string $name, string $value, string $path = '/', string $domain = null) { $this->name = $name; $this->value = $value; $this->path = $path; $this->domain = $domain; } public function toString(): string { $str = sprintf('has cookie "%s"', $this->name); if ('/' !== $this->path) { $str .= sprintf(' with path "%s"', $this->path); } if ($this->domain) { $str .= sprintf(' for domain "%s"', $this->domain); } $str .= sprintf(' with value "%s"', $this->value); return $str; } /** * @param Response $response */ protected function matches($response): bool { $cookie = $this->getCookie($response); if (!$cookie) { return false; } return $this->value === (string) $cookie->getValue(); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } protected function getCookie(Response $response): ?Cookie { $cookies = $response->headers->getCookies(); $filteredCookies = array_filter($cookies, fn (Cookie $cookie) => $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain); return reset($filteredCookies) ?: null; } } Constraint/ResponseIsUnprocessable.php 0000644 00000002027 15107366341 0014230 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Response; final class ResponseIsUnprocessable extends Constraint { public function toString(): string { return 'is unprocessable'; } /** * @param Response $other */ protected function matches($other): bool { return Response::HTTP_UNPROCESSABLE_ENTITY === $other->getStatusCode(); } /** * @param Response $other */ protected function failureDescription($other): string { return 'the Response '.$this->toString(); } /** * @param Response $other */ protected function additionalFailureDescription($other): string { return (string) $other; } } Constraint/ResponseIsSuccessful.php 0000644 00000002000 15107366342 0013532 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Response; final class ResponseIsSuccessful extends Constraint { public function toString(): string { return 'is successful'; } /** * @param Response $response */ protected function matches($response): bool { return $response->isSuccessful(); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } /** * @param Response $response */ protected function additionalFailureDescription($response): string { return (string) $response; } } Constraint/ResponseIsRedirected.php 0000644 00000001776 15107366342 0013510 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Response; final class ResponseIsRedirected extends Constraint { public function toString(): string { return 'is redirected'; } /** * @param Response $response */ protected function matches($response): bool { return $response->isRedirect(); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } /** * @param Response $response */ protected function additionalFailureDescription($response): string { return (string) $response; } } Constraint/ResponseFormatSame.php 0000644 00000002674 15107366342 0013176 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * Asserts that the response is in the given format. * * @author Kévin Dunglas <dunglas@gmail.com> */ final class ResponseFormatSame extends Constraint { private Request $request; private ?string $format; public function __construct(Request $request, ?string $format) { $this->request = $request; $this->format = $format; } public function toString(): string { return 'format is '.($this->format ?? 'null'); } /** * @param Response $response */ protected function matches($response): bool { return $this->format === $this->request->getFormat($response->headers->get('Content-Type')); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } /** * @param Response $response */ protected function additionalFailureDescription($response): string { return (string) $response; } } Constraint/ResponseHeaderSame.php 0000644 00000002276 15107366342 0013134 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Response; final class ResponseHeaderSame extends Constraint { private string $headerName; private string $expectedValue; public function __construct(string $headerName, string $expectedValue) { $this->headerName = $headerName; $this->expectedValue = $expectedValue; } public function toString(): string { return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue); } /** * @param Response $response */ protected function matches($response): bool { return $this->expectedValue === $response->headers->get($this->headerName, null); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } } Constraint/ResponseHasHeader.php 0000644 00000002017 15107366343 0012754 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Response; final class ResponseHasHeader extends Constraint { private string $headerName; public function __construct(string $headerName) { $this->headerName = $headerName; } public function toString(): string { return sprintf('has header "%s"', $this->headerName); } /** * @param Response $response */ protected function matches($response): bool { return $response->headers->has($this->headerName); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } } Constraint/ResponseHasCookie.php 0000644 00000003415 15107366343 0013000 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Response; final class ResponseHasCookie extends Constraint { private string $name; private string $path; private ?string $domain; public function __construct(string $name, string $path = '/', string $domain = null) { $this->name = $name; $this->path = $path; $this->domain = $domain; } public function toString(): string { $str = sprintf('has cookie "%s"', $this->name); if ('/' !== $this->path) { $str .= sprintf(' with path "%s"', $this->path); } if ($this->domain) { $str .= sprintf(' for domain "%s"', $this->domain); } return $str; } /** * @param Response $response */ protected function matches($response): bool { return null !== $this->getCookie($response); } /** * @param Response $response */ protected function failureDescription($response): string { return 'the Response '.$this->toString(); } private function getCookie(Response $response): ?Cookie { $cookies = $response->headers->getCookies(); $filteredCookies = array_filter($cookies, fn (Cookie $cookie) => $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain); return reset($filteredCookies) ?: null; } }
Simpan