File tree Expand file tree Collapse file tree 3 files changed +91
-0
lines changed Expand file tree Collapse file tree 3 files changed +91
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
+ HttpImATeapotExceptionTest.php - Part of the php-exceptions project.
4
+
5
+ © - Jitesoft
6
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
7
+ namespace Jitesoft \Exceptions \Tests \Http \Client ;
8
+
9
+ use Jitesoft \Exceptions \Http \Client \HttpImATeapotException ;
10
+ use Jitesoft \Exceptions \Tests \Http \HttpExceptionTest ;
11
+
12
+ /**
13
+ * @group Exceptions
14
+ * @group HttpExceptions
15
+ * @group RuntimeExceptions
16
+ * @group HttpClientExceptions
17
+ */
18
+ class HttpImATeapotExceptionTest extends HttpExceptionTest {
19
+
20
+ protected $ expectedErrorCode = 418 ;
21
+
22
+ protected function throwDefaultException () {
23
+ throw new HttpImATeapotException ();
24
+ }
25
+
26
+ public function throwMessageException (string $ message ) {
27
+ throw new HttpImATeapotException ($ message );
28
+ }
29
+
30
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
+ HttpToEarlyExceptionTest.php - Part of the php-exceptions project.
4
+
5
+ © - Jitesoft
6
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
7
+ namespace Jitesoft \Exceptions \Tests \Http \Client ;
8
+
9
+ use Jitesoft \Exceptions \Http \Client \HttpToEarlyException ;
10
+ use Jitesoft \Exceptions \Tests \Http \HttpExceptionTest ;
11
+
12
+ /**
13
+ * @group Exceptions
14
+ * @group HttpExceptions
15
+ * @group RuntimeExceptions
16
+ * @group HttpClientExceptions
17
+ */
18
+ class HttpToEarlyExceptionTest extends HttpExceptionTest {
19
+
20
+ protected $ expectedErrorCode = 425 ;
21
+
22
+ protected function throwDefaultException (): void {
23
+ throw new HttpToEarlyException ();
24
+ }
25
+
26
+ public function throwMessageException (string $ message ): void {
27
+ throw new HttpToEarlyException ($ message );
28
+ }
29
+
30
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
+ HttpUnavailableForLegalReasonsExceptionTest.php - Part of the php-exceptions project.
4
+
5
+ © - Jitesoft
6
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
7
+ namespace Jitesoft \Exceptions \Tests \Http \Client ;
8
+
9
+ use Jitesoft \Exceptions \Http \Client \HttpGoneException ;
10
+ use Jitesoft \Exceptions \Http \Client \HttpUnavailableForLegalReasonsException ;
11
+ use Jitesoft \Exceptions \Tests \Http \HttpExceptionTest ;
12
+
13
+ /**
14
+ * @group Exceptions
15
+ * @group HttpExceptions
16
+ * @group RuntimeExceptions
17
+ * @group HttpClientExceptions
18
+ */
19
+ class HttpUnavailableForLegalReasonsExceptionTest extends HttpExceptionTest {
20
+
21
+ protected $ expectedErrorCode = 451 ;
22
+
23
+ protected function throwDefaultException (): void {
24
+ throw new HttpUnavailableForLegalReasonsException ();
25
+ }
26
+
27
+ public function throwMessageException (string $ message ): void {
28
+ throw new HttpUnavailableForLegalReasonsException ($ message );
29
+ }
30
+
31
+ }
You can’t perform that action at this time.
0 commit comments