withQueryParams() 공개 메소드

public withQueryParams ( array $query )
$query array
예제 #1
0
파일: CycleTest.php 프로젝트: chuchiy/phpex
 public function testParamsOrder()
 {
     $request = new ServerRequest();
     $cycle = new Cycle($request->withParsedBody(['foo' => 'bar']));
     $this->assertEquals('bar', $cycle['foo']);
     $cycle = new Cycle($request->withCookieParams(['foo' => 'cookie']));
     $this->assertEquals('cookie', $cycle['foo']);
     $cycle = new Cycle($request->withCookieParams(['foo' => 'cookie'])->withParsedBody(['foo' => 'post']));
     $this->assertEquals('cookie', $cycle['foo']);
     $cycle = new Cycle($request->withQueryParams(['foo' => 'get'])->withParsedBody(['foo' => 'post']));
     $this->assertEquals('post', $cycle['foo']);
     $cycle = new Cycle($request->withQueryParams(['foo' => 'get'])->withParsedBody(['foo' => 'post']));
     $cycle->setPathParameters(['foo' => 'path']);
     $this->assertEquals('path', $cycle['foo']);
 }