Пример #1
0
 /**
  * @test
  */
 public function it_can_override_the_response_header_argument_with_the_response_header_method()
 {
     $this->requestIdGenerator->expects($this->any())->method('generate')->will($this->returnValue('yolo'));
     $alternateStackedApp = new RequestId($this->app, $this->requestIdGenerator, $this->header, 'Bad-Request-Id');
     $alternateStackedApp->enableResponseHeader('Good-Request-Id');
     $response = $alternateStackedApp->handle($this->CreateRequest());
     $this->assertFalse($response->headers->has('Bad-Request-Id'));
     $this->assertTrue($response->headers->has('Good-Request-Id'));
 }