Beispiel #1
0
 public function test_factory_should_merge_config_options()
 {
     $exception = $this->build_exception();
     $notice = Notice::factory(array('exception' => $exception));
     $expected = new Notice(Honeybadger::$config->merge(array('exception' => $exception)));
     $this->assertEquals($expected, $notice);
 }
 private static function build_notice_for($exception, array $options = array())
 {
     if ($exception instanceof \Exception) {
         $options['exception'] = self::unwrap_exception($exception);
     } elseif (Arr::is_array($exception)) {
         $options = Arr::merge($options, $exception);
     }
     return Notice::factory($options);
 }