Since: 5.4.0 (09.02.2015)
Author: Vitaliy Demidov (vitaliy@scalr.com)
Example #1
0
 /**
  * @test
  */
 public function testError()
 {
     try {
         $this->app->error();
         $this->assertTrue(false, 'app->error() should throw StopException');
     } catch (StopException $e) {
         $this->assertTrue(true);
         $this->assertEquals(500, $this->app->response->getStatus());
     }
 }
Example #2
0
 /**
  * @test
  */
 public function testError()
 {
     $this->app->getContainer()->apilogger->setIsEnabled(false);
     try {
         $this->app->error();
         $this->assertTrue(false, 'app->error() should throw StopException');
     } catch (StopException $e) {
         $this->assertTrue(true);
         $this->assertEquals(500, $this->app->response->getStatus());
     }
 }
Example #3
0
 /**
  * Gets default settings
  */
 public static function getDefaultSettings()
 {
     return array_merge(parent::getDefaultSettings(), [self::SETTING_SCALR_ENVIRONMENT => null]);
 }
Example #4
0
 /**
  * {@inheritdoc}
  * @see Application::delete()
  */
 public function delete($path, $options, $requirements = [])
 {
     return parent::delete($path, $options, $requirements)->addMethod(Request::METHOD_OPTIONS);
 }