From 25ba2abf5479e8461f8fe2e456e4273b3d88c8c6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Agafonov Date: Thu, 24 Nov 2011 17:57:40 +0400 Subject: [PATCH] Replacment Exception() on InitializationException(), GeneralException() in /view --- tests/view/PHPViewTest.php | 2 +- tests/view/helpers/MsgViewHelperTest.php | 2 +- view/PHPView.php | 2 +- view/helpers/MsgViewHelper.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/view/PHPViewTest.php b/tests/view/PHPViewTest.php index 6a31747..7a0750e 100644 --- a/tests/view/PHPViewTest.php +++ b/tests/view/PHPViewTest.php @@ -139,7 +139,7 @@ class PHPViewTest extends PHPUnit_Framework_TestCase } /** - * @expectedException InitializationException + * @expectedException GeneralException * @expectedExceptionMessage Template */ public function testErrorTemplate() diff --git a/tests/view/helpers/MsgViewHelperTest.php b/tests/view/helpers/MsgViewHelperTest.php index a369d3f..4e81fbb 100644 --- a/tests/view/helpers/MsgViewHelperTest.php +++ b/tests/view/helpers/MsgViewHelperTest.php @@ -41,7 +41,7 @@ class MsgViewHelperTest extends PHPUnit_Framework_TestCase } /** - * @expectedException InitializationException + * @expectedException GeneralException * @expectedExceptionMessage Unknown message type */ public function testWrongType() diff --git a/view/PHPView.php b/view/PHPView.php index 39de856..9ae33be 100644 --- a/view/PHPView.php +++ b/view/PHPView.php @@ -92,7 +92,7 @@ class PHPView implements iView ob_start(); if (!is_readable($this->template)) { ob_clean(); - throw new InitializationException('Template "' . $this->template .'" not found.'); + throw new GeneralException('Template "' . $this->template .'" not found.'); } include($this->template); return ob_get_clean(); diff --git a/view/helpers/MsgViewHelper.php b/view/helpers/MsgViewHelper.php index 95f7128..b548ff7 100644 --- a/view/helpers/MsgViewHelper.php +++ b/view/helpers/MsgViewHelper.php @@ -21,7 +21,7 @@ class MsgViewHelper extends ViewHelper { if ($msg && $type) { if (!in_array($type, array(self::SUCCESS, self::ERROR))) { - throw new InitializationException('Unknown message type: "' . $type . '"'); + throw new GeneralException('Unknown message type: "' . $type . '"'); } Session::set(__CLASS__, array('message' => $msg, 'type' => $type)); }