예제 #1
0
 public function testSuccessfulArrayResponse()
 {
     $event = new ResponseEvent();
     $response = $this->getMockBuilder('Buzz\\Message\\Response')->getMock();
     $response->method('isSuccessful')->willReturn(true);
     $response->method('getContent')->willReturn(array('test' => 'array'));
     $event->setResponse($response);
     $this->assertTrue($event->isSuccessful());
     $this->assertInstanceOf('Buzz\\Message\\Response', $event->getResponse());
     $this->assertEquals(array('test' => 'array'), $event->getContent());
 }
예제 #2
0
 /**
  * @codeCoverageIgnore
  */
 public function onPing(ResponseEvent $event)
 {
     $route = $this->routeProvider->ping;
     $response = $route->process();
     $event->setResponse($response);
 }