@@ -106,18 +106,18 @@ public function testValidator()
106
106
107
107
public function testValidatorMultiple ()
108
108
{
109
- $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"xyzabc ") } ' ]);
109
+ $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"191.168.1 ") } ' ]);
110
110
$ response ->assertJson ([
111
111
'errors ' => [
112
112
[
113
- 'message ' => 'The foo must start with one of the following: abc ' ,
113
+ 'message ' => 'The foo must start with one of the following: 192 ' ,
114
114
'extensions ' => [
115
115
'argument ' => 'foo ' ,
116
116
'category ' => 'Validate '
117
117
],
118
118
],
119
119
[
120
- 'message ' => 'The foo must end with one of the following: xyz ' ,
120
+ 'message ' => 'The foo must be a valid IPv4 address. ' ,
121
121
'extensions ' => [
122
122
'argument ' => 'foo ' ,
123
123
'category ' => 'Validate '
@@ -127,11 +127,11 @@ public function testValidatorMultiple()
127
127
]);
128
128
129
129
$ this ->assertSame (400 , $ response ->getStatusCode (), $ response ->getContent ());
130
- $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"abcdef ") } ' ]);
130
+ $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"192.168.1 ") } ' ]);
131
131
$ response ->assertJson ([
132
132
'errors ' => [
133
133
[
134
- 'message ' => 'The foo must end with one of the following: xyz ' ,
134
+ 'message ' => 'The foo must be a valid IPv4 address. ' ,
135
135
'extensions ' => [
136
136
'argument ' => 'foo ' ,
137
137
'category ' => 'Validate '
@@ -143,11 +143,11 @@ public function testValidatorMultiple()
143
143
$ this ->assertSame (400 , $ response ->getStatusCode (), $ response ->getContent ());
144
144
145
145
$ this ->assertSame (400 , $ response ->getStatusCode (), $ response ->getContent ());
146
- $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"uvwxyz ") } ' ]);
146
+ $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"191.168.1.1 ") } ' ]);
147
147
$ response ->assertJson ([
148
148
'errors ' => [
149
149
[
150
- 'message ' => 'The foo must start with one of the following: abc ' ,
150
+ 'message ' => 'The foo must start with one of the following: 192 ' ,
151
151
'extensions ' => [
152
152
'argument ' => 'foo ' ,
153
153
'category ' => 'Validate '
@@ -158,7 +158,7 @@ public function testValidatorMultiple()
158
158
159
159
$ this ->assertSame (400 , $ response ->getStatusCode (), $ response ->getContent ());
160
160
161
- $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"abcxyz ") } ' ]);
161
+ $ response = $ this ->json ('POST ' , '/graphql ' , ['query ' => '{ testValidatorMultiple(foo:"192.168.1.1 ") } ' ]);
162
162
$ this ->assertSame (200 , $ response ->getStatusCode (), $ response ->getContent ());
163
163
}
164
164
}
0 commit comments