'1'], post: ['name' => 'alpha'], files: ['image' => ['name' => 'a.png', 'tmp_name' => '/tmp/x', 'error' => 0, 'size' => 12, 'type' => 'image/png']], cookies: ['__csrf' => 'cookie-value'], server: ['HTTP_HOST' => 'localhost'], queryString: 'q=1', method: 'POST', path: '/scenarios/demo/edit/team', contentType: 'application/x-www-form-urlencoded', rawBody: '', ); self::assertSame(['q' => '1'], $request->get); self::assertSame(['name' => 'alpha'], $request->post); self::assertSame('a.png', $request->files['image']['name']); self::assertSame('cookie-value', $request->cookies['__csrf']); self::assertSame('localhost', $request->server['HTTP_HOST']); self::assertSame('q=1', $request->queryString); self::assertSame('POST', $request->method); self::assertSame('/scenarios/demo/edit/team', $request->path); self::assertSame('application/x-www-form-urlencoded', $request->contentType); self::assertSame('', $request->rawBody); } public function testItAllowsNullContentType(): void { $request = new Request( get: [], post: [], files: [], cookies: [], server: [], queryString: '', method: 'GET', path: '/', contentType: null, rawBody: '', ); self::assertNull($request->contentType); } }