/**
  * @dataProvider getDataFatalErrors
  */
 public function testFatalErrors($type, $shouldRun)
 {
     $error = array('line' => 33, 'file' => 'some-file.php', 'message' => 'hi < there!', 'type' => $type);
     if ($shouldRun) {
         $this->_mockLogger->shouldReceive('error')->once()->with(sprintf('Fatal error (type <code>%s</code>) detected on line <code>33</code> of <code>some-file.php</code>: <code>hi &lt; there!</code>', $type));
     }
     $this->_sut->onFatalError($this->_mockLogger, $error);
 }
 public function _handleFatalError()
 {
     $lastError = error_get_last();
     if (!is_array($lastError) || !$this->_bootLogger->isEnabled()) {
         //no error or logging not enabled
         return;
     }
     if (!class_exists('tubepress_internal_boot_helper_FatalErrorHandler', false)) {
         require __DIR__ . '/helper/FatalErrorHandler.php';
     }
     $handler = new tubepress_internal_boot_helper_FatalErrorHandler();
     $handler->onFatalError($this->_bootLogger, $lastError);
 }