Browse Source

Merge branch '2.1-alltests' into 2.1

Jose Lorenzo Rodriguez 14 years ago
parent
commit
2c5cb1157f

+ 3 - 1
lib/Cake/Model/Datasource/Session/DatabaseSession.php

@@ -150,6 +150,8 @@ class DatabaseSession implements CakeSessionHandlerInterface {
  * @return void
  */
 	public function __destruct() {
-		session_write_close();
+		try {
+			session_write_close();
+		} catch (Exception $e) {}
 	}
 }

+ 4 - 1
lib/Cake/Test/Case/AllDatabaseTest.php

@@ -43,7 +43,10 @@ class AllDatabaseTest extends PHPUnit_Framework_TestSuite {
 			'Datasource' . DS . 'Database' . DS . 'Mysql',
 			'Datasource' . DS . 'Database' . DS . 'Postgres',
 			'Datasource' . DS . 'Database' . DS . 'Sqlite',
-			'Datasource' . DS . 'Database' . DS . 'Sqlserver'
+			'Datasource' . DS . 'Database' . DS . 'Sqlserver',
+			'Datasource' . DS . 'CakeSession',
+			'Datasource' . DS . 'Session' . DS . 'CacheSession',
+			'Datasource' . DS . 'Session' . DS . 'DatabaseSession',
 		);
 		foreach ($tasks as $task) {
 			$suite->addTestFile($path . $task . 'Test.php');

+ 40 - 0
lib/Cake/Test/Case/AllEventTest.php

@@ -0,0 +1,40 @@
+<?php
+/**
+ * AllEventTest file
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link          http://cakephp.org CakePHP(tm) Project
+ * @package       Cake.Test.Case
+ * @since         CakePHP(tm) v 2.0
+ * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+
+/**
+ * AllEventTest class
+ *
+ * This test group will run Event tests.
+ *
+ * @package       Cake.Test.Case
+ */
+class AllEventTest extends PHPUnit_Framework_TestSuite {
+
+/**
+ * suite method, defines tests for this suite.
+ *
+ * @return void
+ */
+	public static function suite() {
+		$suite = new CakeTestSuite('All Event related class tests');
+		$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Event');
+		return $suite;
+	}
+}
+

+ 1 - 0
lib/Cake/Test/Case/AllTestsTest.php

@@ -45,6 +45,7 @@ class AllTests extends PHPUnit_Framework_TestSuite {
 		$suite->addTestFile($path . 'AllControllerTest.php');
 		$suite->addTestFile($path . 'AllDatabaseTest.php');
 		$suite->addTestFile($path . 'AllErrorTest.php');
+		$suite->addTestFile($path . 'AllEventTest.php');
 		$suite->addTestFile($path . 'AllHelpersTest.php');
 		$suite->addTestFile($path . 'AllLogTest.php');
 		$suite->addTestFile($path . 'AllI18nTest.php');

+ 3 - 0
lib/Cake/Test/test_app/Model/Datasource/Session/TestAppLibSession.php

@@ -3,6 +3,9 @@
  * Test suite app/Model/Datasource/Session session handler
  *
  */
+
+App::uses('CakeSessionHandlerInterface', 'Model/Datasource/Session');
+
 class TestAppLibSession implements CakeSessionHandlerInterface {
 
 	public function open() {

+ 3 - 0
lib/Cake/Test/test_app/Plugin/TestPlugin/Model/Datasource/Session/TestPluginSession.php

@@ -2,6 +2,9 @@
 /**
  * Test suite plugin session handler
  */
+
+App::uses('CakeSessionHandlerInterface', 'Model/Datasource/Session');
+
 class TestPluginSession implements CakeSessionHandlerInterface {
 
 	public function open() {