PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0.1
GiveWP – Donation Plugin and Fundraising Platform v4.18.0.1
4.18.0.1 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 All 258 releases
give / vendor / vendor-prefixed / symfony / http-foundation / Test / Constraint / ResponseIsSuccessful.php

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

57 lines 1.1 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 ResponseIsSuccessful extends Constraint
18 {
19 /**
20 * {@inheritdoc}
21 */
22 public function toString(): string
23 {
24 return 'is successful';
25 }
26
27 /**
28 * @param Response $response
29 *
30 * {@inheritdoc}
31 */
32 protected function matches($response): bool
33 {
34 return $response->isSuccessful();
35 }
36
37 /**
38 * @param Response $response
39 *
40 * {@inheritdoc}
41 */
42 protected function failureDescription($response): string
43 {
44 return 'the Response '.$this->toString();
45 }
46
47 /**
48 * @param Response $response
49 *
50 * {@inheritdoc}
51 */
52 protected function additionalFailureDescription($response): string
53 {
54 return (string) $response;
55 }
56 }
57