Browse Source

add test for missing datasource template to be rendered

Anthony GRASSIOT 11 years ago
parent
commit
5c41beba72
1 changed files with 9 additions and 0 deletions
  1. 9 0
      tests/TestCase/Error/ExceptionRendererTest.php

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

@@ -24,6 +24,7 @@ use Cake\Core\App;
 use Cake\Core\Configure;
 use Cake\Core\Error\MissingPluginException;
 use Cake\Core\Plugin;
+use Cake\Datasource\Error\MissingDatasourceConfigException;
 use Cake\Error;
 use Cake\Error\ExceptionRenderer;
 use Cake\Event\Event;
@@ -565,6 +566,14 @@ class ExceptionRendererTest extends TestCase {
 				500
 			),
 			array(
+				new MissingDatasourceConfigException(array('name' => 'MyDatasourceConfig')),
+				array(
+					'/<h2>Missing Datasource Configuration<\/h2>/',
+					'/<em>MyDatasourceConfig<\/em> was not found/'
+				),
+				500
+			),
+			array(
 				new \Exception('boom'),
 				array(
 					'/Internal Error/'