PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / vendor / vendor-prefixed / symfony / http-foundation / Test / Constraint / ResponseIsUnprocessable.php

ResponseIsUnprocessable.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at vendor/vendor-prefixed/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php

57 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Give\Vendors\Symfony\Component\HttpFoundation\Test\Constraint;
13
14 use PHPUnit\Framework\Constraint\Constraint;
15 use Give\Vendors\Symfony\Component\HttpFoundation\Response;
16
17 final class ResponseIsUnprocessable extends Constraint
18 {
19 /**
20 * {@inheritdoc}
21 */
22 public function toString(): string
23 {
24 return 'is unprocessable';
25 }
26
27 /**
28 * @param Response $other
29 *
30 * {@inheritdoc}
31 */
32 protected function matches($other): bool
33 {
34 return Response::HTTP_UNPROCESSABLE_ENTITY === $other->getStatusCode();
35 }
36
37 /**
38 * @param Response $other
39 *
40 * {@inheritdoc}
41 */
42 protected function failureDescription($other): string
43 {
44 return 'the Response '.$this->toString();
45 }
46
47 /**
48 * @param Response $other
49 *
50 * {@inheritdoc}
51 */
52 protected function additionalFailureDescription($other): string
53 {
54 return (string) $other;
55 }
56 }
57