Example #1
0
 public function testErrorWithFullArguments()
 {
     $context = new Context();
     try {
         $context->error('bar', 403, ['foo' => 'bar'], 42);
     } catch (\Exception $e) {
         $this->assertInstanceOf('Symfony\\Component\\HttpKernel\\Exception\\HttpException', $e);
         $this->assertSame('bar', $e->getMessage());
         $this->assertSame(['foo' => 'bar'], $e->getHeaders());
         $this->assertSame(42, $e->getCode());
     }
 }