Merge branch '2.1-alltests' into 2.1

This commit is contained in:
Jose Lorenzo Rodriguez 2012-01-12 20:13:58 -04:30
commit 2c5cb1157f
6 changed files with 54 additions and 2 deletions

View file

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

View file

@ -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');

View file

@ -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;
}
}

View file

@ -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');

View file

@ -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() {

View file

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