Exemplo n.º 1
0
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package    Piece_Unity
 * @copyright  2007-2009 KUBO Atsuhiro <*****@*****.**>
 * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
 * @version    Release: @package_version@
 * @since      File available since Release 1.0.0
 */
error_reporting(E_ALL);
set_include_path(realpath(dirname(__FILE__)) . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../src') . PATH_SEPARATOR . get_include_path());
require_once 'PHPUnit/Framework.php';
require_once 'Stagehand/Autoload.php';
$loader = Stagehand_Autoload::legacyLoader();
$loader->addNamespace('Stagehand');
$loader->addNamespace('Piece');
Stagehand_Autoload::register($loader);
Stagehand_LegacyError_PHPError::enableConversion();
Stagehand_LegacyError_PEARError::enableConversion();
Stagehand_LegacyError_PEARErrorStack::enableConversion();
/*
 * Local Variables:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * indent-tabs-mode: nil
 * End:
 */
 /**
  */
 public static function disable()
 {
     restore_exception_handler();
     Stagehand_LegacyError_PEARErrorStack::disableConversion();
     Stagehand_LegacyError_PEARError::disableConversion();
     Stagehand_LegacyError_PHPError::disableConversion();
 }
Exemplo n.º 3
0
 /**
  */
 public static function enableConversion()
 {
     self::$oldCallback = $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*'];
     $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*'] = array(__CLASS__, 'toException');
     class_exists('Stagehand_LegacyError_PEARErrorStack_Exception');
 }