mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Migrating Cache group case to PHPUnit.
This commit is contained in:
parent
9ace0100ab
commit
4a5353e00a
2 changed files with 49 additions and 49 deletions
49
cake/tests/cases/libs/all_cache_engines.test.php
Normal file
49
cake/tests/cases/libs/all_cache_engines.test.php
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
/**
|
||||
* AllCacheEngines file
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake
|
||||
* @subpackage cake.tests.cases
|
||||
* @since CakePHP(tm) v 1.2.0.4206
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
/**
|
||||
* AllCacheEngines class
|
||||
*
|
||||
* This test group will run view class tests (view, theme)
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.tests.groups
|
||||
*/
|
||||
class AllCacheEngines extends PHPUnit_Framework_TestSuite {
|
||||
|
||||
/**
|
||||
* suite method, defines tests for this suite.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Cache related class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cache.test.php');
|
||||
|
||||
$cacheIterator = new DirectoryIterator(CORE_TEST_CASES . DS . 'libs' . DS . 'cache');
|
||||
foreach ($cacheIterator as $i => $file) {
|
||||
if (!$file->isDot()) {
|
||||
$suite->addTestfile($file->getPathname());
|
||||
}
|
||||
}
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* CacheGroupTest file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The Open Group Test Suite License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
|
||||
* @package cake
|
||||
* @subpackage cake.tests.groups
|
||||
* @since CakePHP(tm) v 1.2.0.4206
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
|
||||
/**
|
||||
* CacheGroupTest class
|
||||
*
|
||||
* This test group will run all the Cache class test and all core cache engine tests
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.tests.groups
|
||||
*/
|
||||
class CacheGroupTest extends TestSuite {
|
||||
|
||||
/**
|
||||
* label property
|
||||
*
|
||||
* @var string 'All core cache engines'
|
||||
* @access public
|
||||
*/
|
||||
public $label = 'Cache and all CacheEngines';
|
||||
|
||||
/**
|
||||
* CacheGroupTest method
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function CacheGroupTest() {
|
||||
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cache');
|
||||
TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cache');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue