ソースを参照

Remove exceptions no longer used.

ADmad 12 年 前
コミット
6bcf9873f0

+ 0 - 35
src/Error/MissingConnectionException.php

@@ -1,35 +0,0 @@
-<?php
-/**
- * MissingConnectionException class
- *
- * PHP 5
- *
- * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
- * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html
- * @since         3.0.0
- * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
- */
-namespace Cake\Error;
-
-/**
- * Used when no connections can be found.
- *
- */
-class MissingConnectionException extends Exception {
-
-	protected $_messageTemplate = 'Database connection "%s" is missing, or could not be created.';
-
-	public function __construct($message, $code = 500) {
-		if (is_array($message)) {
-			$message += array('enabled' => true);
-		}
-		parent::__construct($message, $code);
-	}
-
-}

+ 0 - 28
src/Error/MissingDatabaseException.php

@@ -1,28 +0,0 @@
-<?php
-/**
- * MissingDatabaseException class
- *
- * PHP 5
- *
- * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
- * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html
- * @since         3.0.0
- * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
- */
-namespace Cake\Error;
-
-/**
- * Runtime Exceptions for ConnectionManager
- *
- */
-class MissingDatabaseException extends Exception {
-
-	protected $_messageTemplate = 'Database connection "%s" could not be found.';
-
-}

+ 0 - 28
src/Error/MissingTableException.php

@@ -1,28 +0,0 @@
-<?php
-/**
- * MissingTableException class
- *
- * PHP 5
- *
- * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
- * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html
- * @since         3.0.0
- * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
- */
-namespace Cake\Error;
-
-/**
- * Exception class to be thrown when a database table is not found in the datasource
- *
- */
-class MissingTableException extends Exception {
-
-	protected $_messageTemplate = 'Table %s for model %s was not found in datasource %s.';
-
-}

+ 0 - 28
src/Error/MissingTestLoaderException.php

@@ -1,28 +0,0 @@
-<?php
-/**
- * MissingTestLoaderException class
- *
- * PHP 5
- *
- * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
- * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://book.cakephp.org/2.0/en/development/testing.html
- * @since         3.0.0
- * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
- */
-namespace Cake\Error;
-
-/**
- * Exception raised when a test loader could not be found
- *
- */
-class MissingTestLoaderException extends Exception {
-
-	protected $_messageTemplate = 'Test loader %s could not be found.';
-
-}

+ 0 - 33
tests/TestCase/Error/ExceptionRendererTest.php

@@ -510,22 +510,6 @@ class ExceptionRendererTest extends TestCase {
 				404
 			),
 			array(
-				new Error\MissingTableException(array('table' => 'articles', 'class' => 'Article', 'ds' => 'test')),
-				array(
-					'/<h2>Missing Database Table<\/h2>/',
-					'/Table <em>articles<\/em> for model <em>Article<\/em> was not found in datasource <em>test<\/em>/'
-				),
-				500
-			),
-			array(
-				new Error\MissingDatabaseException(array('connection' => 'default')),
-				array(
-					'/<h2>Missing Database Connection<\/h2>/',
-					'/Confirm you have created the file/'
-				),
-				500
-			),
-			array(
 				new Error\MissingViewException(array('file' => '/posts/about.ctp')),
 				array(
 					"/posts\/about.ctp/"
@@ -541,23 +525,6 @@ class ExceptionRendererTest extends TestCase {
 				500
 			),
 			array(
-				new Error\MissingConnectionException(array('class' => 'Mysql')),
-				array(
-					'/<h2>Missing Database Connection<\/h2>/',
-					'/A Database connection using "Mysql" was missing or unable to connect./',
-				),
-				500
-			),
-			array(
-				new Error\MissingConnectionException(array('class' => 'Mysql', 'enabled' => false)),
-				array(
-					'/<h2>Missing Database Connection<\/h2>/',
-					'/A Database connection using "Mysql" was missing or unable to connect./',
-					'/Mysql driver is NOT enabled/'
-				),
-				500
-			),
-			array(
 				new Error\MissingHelperException(array('class' => 'MyCustomHelper')),
 				array(
 					'/<h2>Missing Helper<\/h2>/',