@@ -43,6 +43,7 @@ public function testItSetsEmptyStatusOnExceptionWhenAuthorizing()
43
43
} catch (AuthorizationException $ e ) {
44
44
$ this ->assertNull ($ e ->status ());
45
45
$ this ->assertFalse ($ e ->hasStatus ());
46
+ $ this ->assertSame ('foo ' , $ e ->response ()->message ());
46
47
$ this ->assertSame ('foo ' , $ e ->getMessage ());
47
48
$ this ->assertSame (3 , $ e ->getCode ());
48
49
}
@@ -56,6 +57,7 @@ public function testItSetsStatusOnExceptionWhenAuthorizing()
56
57
} catch (AuthorizationException $ e ) {
57
58
$ this ->assertSame (418 , $ e ->status ());
58
59
$ this ->assertTrue ($ e ->hasStatus ());
60
+ $ this ->assertSame ('foo ' , $ e ->response ()->message ());
59
61
$ this ->assertSame ('foo ' , $ e ->getMessage ());
60
62
$ this ->assertSame (3 , $ e ->getCode ());
61
63
}
@@ -66,6 +68,7 @@ public function testItSetsStatusOnExceptionWhenAuthorizing()
66
68
} catch (AuthorizationException $ e ) {
67
69
$ this ->assertSame (404 , $ e ->status ());
68
70
$ this ->assertTrue ($ e ->hasStatus ());
71
+ $ this ->assertSame ('foo ' , $ e ->response ()->message ());
69
72
$ this ->assertSame ('foo ' , $ e ->getMessage ());
70
73
$ this ->assertSame (3 , $ e ->getCode ());
71
74
}
@@ -76,6 +79,7 @@ public function testItSetsStatusOnExceptionWhenAuthorizing()
76
79
} catch (AuthorizationException $ e ) {
77
80
$ this ->assertSame (444 , $ e ->status ());
78
81
$ this ->assertTrue ($ e ->hasStatus ());
82
+ $ this ->assertNull ($ e ->response ()->message ());
79
83
$ this ->assertSame ('This action is unauthorized. ' , $ e ->getMessage ());
80
84
$ this ->assertSame (0 , $ e ->getCode ());
81
85
}
@@ -86,6 +90,7 @@ public function testItSetsStatusOnExceptionWhenAuthorizing()
86
90
} catch (AuthorizationException $ e ) {
87
91
$ this ->assertSame (444 , $ e ->status ());
88
92
$ this ->assertTrue ($ e ->hasStatus ());
93
+ $ this ->assertSame ('foo ' , $ e ->response ()->message ());
89
94
$ this ->assertSame ('foo ' , $ e ->getMessage ());
90
95
$ this ->assertSame (3 , $ e ->getCode ());
91
96
}
@@ -96,6 +101,7 @@ public function testItSetsStatusOnExceptionWhenAuthorizing()
96
101
} catch (AuthorizationException $ e ) {
97
102
$ this ->assertSame (404 , $ e ->status ());
98
103
$ this ->assertTrue ($ e ->hasStatus ());
104
+ $ this ->assertNull ($ e ->response ()->message ());
99
105
$ this ->assertSame ('This action is unauthorized. ' , $ e ->getMessage ());
100
106
$ this ->assertSame (0 , $ e ->getCode ());
101
107
}
@@ -106,6 +112,7 @@ public function testItSetsStatusOnExceptionWhenAuthorizing()
106
112
} catch (AuthorizationException $ e ) {
107
113
$ this ->assertSame (404 , $ e ->status ());
108
114
$ this ->assertTrue ($ e ->hasStatus ());
115
+ $ this ->assertSame ('foo ' , $ e ->response ()->message ());
109
116
$ this ->assertSame ('foo ' , $ e ->getMessage ());
110
117
$ this ->assertSame (3 , $ e ->getCode ());
111
118
}
0 commit comments