Lines Matching refs:Validator
38 self::assertSame('test', Validator::attributes($request)->string('param'));
48 self::assertSame('test', Validator::parsedBody($request)->string('param'));
58 self::assertSame('test', Validator::queryParams($request)->string('param'));
68 self::assertSame('test', Validator::serverParams($request)->string('param'));
80 Validator::queryParams($request);
92 Validator::queryParams($request);
102 self::assertSame(['test'], Validator::queryParams($request)->array('param'));
106 Validator::queryParams($request)->array('invalid');
123 self::assertTrue(Validator::queryParams($request)->boolean('a'));
124 self::assertTrue(Validator::queryParams($request)->boolean('b'));
125 self::assertTrue(Validator::queryParams($request)->boolean('c'));
126 self::assertFalse(Validator::queryParams($request)->boolean('d'));
127 self::assertFalse(Validator::queryParams($request)->boolean('e'));
128 self::assertFalse(Validator::queryParams($request)->boolean('f'));
129 self::assertFalse(Validator::queryParams($request)->boolean('g', false));
133 Validator::queryParams($request)->boolean('h');
149 self::assertSame(42, Validator::queryParams($request)->integer('int_type_positive'));
150 self::assertSame(-42, Validator::queryParams($request)->integer('int_type_negative'));
151 self::assertSame(42, Validator::queryParams($request)->integer('string_type_positive'));
152 self::assertSame(-42, Validator::queryParams($request)->integer('string_type_negative'));
156 Validator::queryParams($request)->integer('invalid');
171 self::assertSame($route, Validator::queryParams($request)->route('valid-route'));
175 Validator::queryParams($request)->route('not-route');
185 self::assertSame('test', Validator::queryParams($request)->string('param'));
189 Validator::queryParams($request)->string('invalid');
204 self::assertSame($tree, Validator::queryParams($request)->tree('valid-tree'));
208 Validator::queryParams($request)->tree('no-tree');
223 self::assertSame($tree, Validator::queryParams($request)->treeOptional('valid-tree'));
224 self::assertNull(Validator::queryParams($request)->treeOptional('missing-tree'));
228 Validator::queryParams($request)->treeOptional('not-tree');
243 self::assertSame($user, Validator::queryParams($request)->user('valid-user'));
247 Validator::queryParams($request)->user('not-user');
257 self::assertSame(42, Validator::queryParams($request)->isBetween(40, 45)->integer('param'));
258 … self::assertSame(42, Validator::queryParams($request)->isBetween(40, 45)->integer('invalid', 42));
259 …self::assertSame(42, Validator::queryParams($request)->isBetween(40, 45)->integer('wrongtype', 42)…
269 …self::assertSame('foo', Validator::queryParams($request)->isInArray(['foo', 'bar'])->string('param…
273 Validator::queryParams($request)->isInArray(['baz'])->string('param');
283 …self::assertSame('foo', Validator::queryParams($request)->isInArrayKeys(['foo' => 1, 'bar' => 2])-…
287 Validator::queryParams($request)->isInArrayKeys(['baz' => 3])->string('param');
297 … self::assertSame('foo', Validator::queryParams($request)->isNotEmpty()->string('not-empty'));
301 Validator::queryParams($request)->isNotEmpty()->string('empty');
311 self::assertSame('BIRT', Validator::queryParams($request)->isTag()->string('valid'));
315 Validator::queryParams($request)->isTag()->string('invalid');
325 self::assertSame('X1', Validator::queryParams($request)->isXref()->string('valid'));
326 self::assertSame(['X1'], Validator::queryParams($request)->isXref()->array('valid-array'));
327 self::assertSame([], Validator::queryParams($request)->isXref()->array('invalid-array'));
331 Validator::queryParams($request)->isXref()->string('invalid');
361 Validator::queryParams($request)->isLocalUrl()->string('https');
377 Validator::queryParams($request)->isLocalUrl()->string('invalid');
389 Validator::queryParams($request)->isLocalUrl()->isLocalUrl()->string('wrongtype');