mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Making all test groups run again,
small fixes in some tests to make them pass
This commit is contained in:
parent
75a1481e22
commit
96baa3015e
31 changed files with 113 additions and 139 deletions
|
@ -31,15 +31,12 @@ class AllBehaviorsTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('Model Behavior and all behaviors');
|
||||
$suite = new CakeTestSuite('Model Behavior and all behaviors');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behaviors' . DS;
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behavior_collection.test.php');
|
||||
$path = CORE_TEST_CASES . DS . 'Model' . DS . 'Behavior' . DS;
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'BehaviorCollectionTest.php');
|
||||
|
||||
$suite->addTestFile($path . 'acl.test.php');
|
||||
$suite->addTestFile($path . 'containable.test.php');
|
||||
$suite->addTestFile($path . 'translate.test.php');
|
||||
$suite->addTestFile($path . 'tree.test.php');
|
||||
$suite->addTestDirectory($path);
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,9 +33,7 @@ class AllCacheEnginesTest extends PHPUnit_Framework_TestSuite {
|
|||
*/
|
||||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All Cache related class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cache.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'cache');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Cache');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ class AllComponentsTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All component class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'component.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'component_collection.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'components');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'components' . DS . 'auth');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'ComponentTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'ComponentCollectionTest.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Controller' . DS . 'Component');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Controller' . DS . 'Component' . DS . 'Auth');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,12 +32,10 @@ class AllConfigureTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All Configure, App and ClassRegistry related tests');
|
||||
$suite = new CakeTestSuite('All Configure and Core related tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'configure.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'config');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'app.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'class_registry.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Core');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Configure');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,13 +32,13 @@ class AllControllersTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Controller related class tests');
|
||||
$suite = new CakeTestSuite('All Controller related class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'scaffold.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'pages_controller.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'component.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller_merge_vars.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'ControllerTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'ScaffoldTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'PagesControllerTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'ComponentTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Controller' . DS . 'ControllerMergeVarsTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -34,18 +34,18 @@ class AllDatabaseTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('Datasources, Schema and DbAcl tests');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS;
|
||||
$path = CORE_TEST_CASES . DS . 'Model' . DS;
|
||||
$tasks = array(
|
||||
'db_acl',
|
||||
'cake_schema',
|
||||
'connection_manager',
|
||||
'datasources' . DS . 'dbo_source',
|
||||
'datasources' . DS . 'dbo' . DS . 'dbo_mysql',
|
||||
'datasources' . DS . 'dbo' . DS . 'dbo_postgres',
|
||||
'datasources' . DS . 'dbo' . DS . 'dbo_sqlite'
|
||||
'DbAcl',
|
||||
'CakeSchema',
|
||||
'ConnectionManager',
|
||||
'Datasource' . DS . 'DboSource',
|
||||
'Datasource' . DS . 'Database' . DS . 'MySql',
|
||||
'Datasource' . DS . 'Database' . DS . 'Postgres',
|
||||
'Datasource' . DS . 'Database' . DS . 'Sqlite'
|
||||
);
|
||||
foreach ($tasks as $task) {
|
||||
$suite->addTestFile($path . $task . '.test.php');
|
||||
$suite->addTestFile($path . $task . 'Test.php');
|
||||
}
|
||||
return $suite;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ class AllErrorTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Error handling tests');
|
||||
|
||||
$libs = CORE_TEST_CASES . DS . 'libs' . DS;
|
||||
$libs = CORE_TEST_CASES . DS;
|
||||
|
||||
$suite->addTestFile($libs . 'error' . DS . 'error_handler.test.php');
|
||||
$suite->addTestFile($libs . 'error' . DS . 'exception_renderer.test.php');
|
||||
$suite->addTestFile($libs . 'Error' . DS . 'ErrorHandlerTest.php');
|
||||
$suite->addTestFile($libs . 'Error' . DS . 'ExceptionRendererTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@ class AllHelpersTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All Helper tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helper.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helper_collection.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS);
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'View' . DS . 'HelperTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'View' . DS . 'HelperCollectionTest.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'View' . DS . 'Helper' . DS);
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,11 +34,11 @@ class AllJavascriptHelpersTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('Js Helper and all Engine Helpers');
|
||||
|
||||
$helperTestPath = CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS;
|
||||
$suite->addTestFile($helperTestPath . 'js.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'jquery_engine.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'mootools_engine.test.php');
|
||||
$suite->addTestFile($helperTestPath . 'prototype_engine.test.php');
|
||||
$helperTestPath = CORE_TEST_CASES . DS . 'View' . DS . 'Helper' . DS;
|
||||
$suite->addTestFile($helperTestPath . 'JsHelperTest.php');
|
||||
$suite->addTestFile($helperTestPath . 'JqueryEngineHelperTest.php');
|
||||
$suite->addTestFile($helperTestPath . 'MootoolsEngineHelperTest.php');
|
||||
$suite->addTestFile($helperTestPath . 'PrototypeEngineHelperTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,22 +32,13 @@ class AllLibsTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All non-MVC lib class tests');
|
||||
$suite = new CakeTestSuite('All non-MVC lib class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'basics.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_session.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'debugger.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'file.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'folder.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'inflector.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'log' . DS . 'file_log.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_log.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'class_registry.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'sanitize.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'set.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'string.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'validation.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'object_collection.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'BasicsTest.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Utility');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Log');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'Datasource' . DS . 'CakeSessionTest.php');
|
||||
//$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Model' . DS . 'Datasource' . DS . 'Session');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -32,11 +32,9 @@ class AllLocalizationTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All localization class tests');
|
||||
$suite = new CakeTestSuite('All localization class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'i18n.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'l10n.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'multibyte.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'I18n');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,11 +34,10 @@ class AllModelTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Model related class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behavior_collection.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_read.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_write.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_validation.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_integration.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelReadTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelWriteTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelValidationTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelIntegrationTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -34,13 +34,11 @@ class AllRoutingTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All Router and Dispatcher class tests');
|
||||
|
||||
$libs = CORE_TEST_CASES . DS . 'libs' . DS;
|
||||
$libs = CORE_TEST_CASES . DS;
|
||||
|
||||
$suite->addTestFile($libs . 'dispatcher.test.php');
|
||||
$suite->addTestFile($libs . 'router.test.php');
|
||||
$suite->addTestDirectory($libs . 'route' . DS);
|
||||
$suite->addTestFile($libs . 'cake_response.test.php');
|
||||
$suite->addTestFile($libs . 'cake_request.test.php');
|
||||
$suite->addTestDirectory($libs . 'Routing');
|
||||
$suite->addTestFile($libs . 'Network' . DS . 'CakeResponseTest.php');
|
||||
$suite->addTestFile($libs . 'Network' . DS . 'CakeRequestTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,10 +34,8 @@ class AllSocketTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All Socket related class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_socket.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'http_socket.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'http_response.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'libs' . DS . 'http');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Network' . DS . 'CakeSocketTest.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Network' . DS . 'Http');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -32,12 +32,9 @@ class AllTestSuiteTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Test Suite classes tests');
|
||||
$suite = new CakeTestSuite('All Test Suite classes tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_case.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_fixture.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'html_coverage_report.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller_test_case.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'TestSuite');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake.tests.cases
|
||||
* @package cakeTests.cases
|
||||
* @since CakePHP(tm) v 2.0
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
* This test group will run all test in the cases/libs/models/behaviors directory
|
||||
*
|
||||
* @package cake.tests.groups
|
||||
* @package cakeTests.groups
|
||||
*/
|
||||
class AllTests extends PHPUnit_Framework_TestSuite {
|
||||
|
||||
|
@ -33,29 +33,26 @@ class AllTests extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Tests');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'libs' . DS;
|
||||
$console = CORE_TEST_CASES . DS . 'console' . DS;
|
||||
$path = CORE_TEST_CASES . DS;
|
||||
$console = $path . 'Console' . DS;
|
||||
|
||||
$suite->addTestFile($console . 'all_console_libs.test.php');
|
||||
$suite->addTestFile($console . 'all_shells.test.php');
|
||||
$suite->addTestFile($console . 'all_tasks.test.php');
|
||||
|
||||
$suite->addTestFile($path . 'all_behaviors.test.php');
|
||||
$suite->addTestFile($path . 'all_cache_engines.test.php');
|
||||
$suite->addTestFile($path . 'all_components.test.php');
|
||||
$suite->addTestFile($path . 'all_configure.test.php');
|
||||
$suite->addTestFile($path . 'all_controllers.test.php');
|
||||
$suite->addTestFile($path . 'all_database.test.php');
|
||||
$suite->addTestFile($path . 'all_error.test.php');
|
||||
$suite->addTestFile($path . 'all_helpers.test.php');
|
||||
$suite->addTestFile($path . 'all_libs.test.php');
|
||||
$suite->addTestFile($path . 'all_localization.test.php');
|
||||
$suite->addTestFile($path . 'all_model.test.php');
|
||||
$suite->addTestFile($path . 'all_routing.test.php');
|
||||
$suite->addTestFile($path . 'all_socket.test.php');
|
||||
$suite->addTestFile($path . 'all_test_suite.test.php');;
|
||||
$suite->addTestFile($path . 'all_views.test.php');
|
||||
$suite->addTestFile($path . 'all_xml.test.php');
|
||||
$suite->addTestFile($console . 'AllConsoleTest.php');
|
||||
$suite->addTestFile($path . 'AllBehaviorsTest.php');
|
||||
$suite->addTestFile($path . 'AllCacheEnginesTest.php');
|
||||
$suite->addTestFile($path . 'AllComponentsTest.php');
|
||||
$suite->addTestFile($path . 'AllConfigureTest.php');
|
||||
$suite->addTestFile($path . 'AllControllersTest.php');
|
||||
$suite->addTestFile($path . 'AllDatabaseTest.php');
|
||||
$suite->addTestFile($path . 'AllErrorTest.php');
|
||||
$suite->addTestFile($path . 'AllHelpersTest.php');
|
||||
$suite->addTestFile($path . 'AllLibsTest.php');
|
||||
$suite->addTestFile($path . 'AllLocalizationTest.php');
|
||||
$suite->addTestFile($path . 'AllModelTest.php');
|
||||
$suite->addTestFile($path . 'AllRoutingTest.php');
|
||||
$suite->addTestFile($path . 'AllSocketTest.php');
|
||||
$suite->addTestFile($path . 'AllTestSuiteTest.php');;
|
||||
$suite->addTestFile($path . 'AllViewsTest.php');
|
||||
$suite->addTestFile($path . 'AllXmlTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,10 +32,9 @@ class AllViewsTest extends PHPUnit_Framework_TestSuite {
|
|||
* @return void
|
||||
*/
|
||||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All View class tests');
|
||||
$suite = new CakeTestSuite('All View class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'view.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'theme.test.php');
|
||||
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'View');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ class AllXmlTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new PHPUnit_Framework_TestSuite('All Xml related class tests');
|
||||
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'xml.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS . 'rss.test.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'Utility' . DS . 'XmlTest.php');
|
||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'View' . DS . 'Helper' . DS . 'RssHelperTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -678,7 +678,7 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('this-is-a-test');
|
||||
$result = ob_get_clean();
|
||||
$pattern = '/(.+?tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern = '/(.+?tests(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
|
||||
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*this-is-a-test.*/s';
|
||||
$this->assertPattern($pattern, $result);
|
||||
|
@ -686,7 +686,7 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', true);
|
||||
$result = ob_get_clean();
|
||||
$pattern = '/(.+?tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern = '/(.+?tests(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
|
||||
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*<div>this-is-a-test<\/div>.*/s';
|
||||
$this->assertPattern($pattern, $result);
|
||||
|
@ -694,7 +694,7 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', false);
|
||||
$result = ob_get_clean();
|
||||
$pattern = '/(.+?tests(\/|\\\)cases(\/|\\\)basics\.test\.php|';
|
||||
$pattern = '/(.+?tests(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
|
||||
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
|
||||
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*\<div\>this-is-a-test\<\/div\>.*/s';
|
||||
$this->assertPattern($pattern, $result);
|
||||
|
|
|
@ -34,9 +34,13 @@ class AllConsoleLibsTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All console lib classes');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'console' . DS . 'libs' . DS;
|
||||
|
||||
$suite->addTestDirectory($path);
|
||||
$path = CORE_TEST_CASES . DS . 'Console';
|
||||
foreach (new DirectoryIterator(dirname(__FILE__)) as $file) {
|
||||
if (!$file->isFile() || strpos($file, 'All') === 0) {
|
||||
continue;
|
||||
}
|
||||
$suite->addTestFile($file->getRealPath());
|
||||
}
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -34,11 +34,11 @@ class AllConsoleTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All console classes');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'console' . DS;
|
||||
$path = CORE_TEST_CASES . DS . 'Console' . DS;
|
||||
|
||||
$suite->addTestFile($path . 'all_console_libs.test.php');
|
||||
$suite->addTestFile($path . 'all_shells.test.php');
|
||||
$suite->addTestFile($path . 'all_tasks.test.php');
|
||||
$suite->addTestFile($path . 'AllConsoleLibsTest.php');
|
||||
$suite->addTestFile($path . 'AllTasksTest.php');
|
||||
$suite->addTestFile($path . 'AllShellsTest.php');
|
||||
return $suite;
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ class AllShellsTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All shell classes');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'console' . DS . 'shells' . DS;
|
||||
$path = CORE_TEST_CASES . DS . 'Console' . DS . 'Command' . DS;
|
||||
|
||||
$suite->addTestDirectory($path);
|
||||
return $suite;
|
||||
|
|
|
@ -34,7 +34,7 @@ class AllTasksTest extends PHPUnit_Framework_TestSuite {
|
|||
public static function suite() {
|
||||
$suite = new CakeTestSuite('All Tasks tests');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'console' . DS . 'shells' . DS . 'tasks' . DS;
|
||||
$path = CORE_TEST_CASES . DS . 'Console' . DS . 'Command' . DS . 'Task' . DS;
|
||||
$suite->addTestDirectory($path);
|
||||
return $suite;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ App::uses('CakeRequest', 'Network');
|
|||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
|
||||
require_once CAKE_TESTS . 'cases' . DS . 'libs' . DS . 'model' . DS . 'models.php';
|
||||
require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php';
|
||||
|
||||
/**
|
||||
* Test case for BasicAuthentication
|
||||
|
|
|
@ -19,7 +19,7 @@ App::uses('AppModel', 'Model');
|
|||
App::uses('CakeRequest', 'Network');
|
||||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
require_once CAKE_TESTS . 'cases' . DS . 'libs' . DS . 'model' . DS . 'models.php';
|
||||
require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php';
|
||||
|
||||
/**
|
||||
* Test case for DigestAuthentication
|
||||
|
|
|
@ -20,7 +20,7 @@ App::uses('AppModel', 'Model');
|
|||
App::uses('CakeRequest', 'Network');
|
||||
App::uses('CakeResponse', 'Network');
|
||||
|
||||
require_once CAKE_TESTS . 'cases' . DS . 'libs' . DS . 'model' . DS . 'models.php';
|
||||
require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php';
|
||||
|
||||
/**
|
||||
* Test case for FormAuthentication
|
||||
|
|
|
@ -1058,7 +1058,7 @@ HTMLBLOC;
|
|||
$this->Controller->EmailTest->sendAs = 'text';
|
||||
$this->assertTrue($this->Controller->EmailTest->send($body));
|
||||
$msg = $this->Controller->Session->read('Message.email.message');
|
||||
$this->assertPattern('/' . preg_quote('Content-Disposition: attachment; filename="email.test.php"') . '/', $msg);
|
||||
$this->assertPattern('/' . preg_quote('Content-Disposition: attachment; filename="EmailComponentTest.php"') . '/', $msg);
|
||||
$this->assertPattern('/' . preg_quote('Content-Disposition: attachment; filename="some-name.php"') . '/', $msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ if (!class_exists('AppController', false)) {
|
|||
class CakeTestCaseTest extends CakeTestCase {
|
||||
|
||||
public static function setUpBeforeClass() {
|
||||
require_once LIBS . 'tests' . DS . 'fixtures' . DS . 'assert_tags_test_case.php';
|
||||
require_once LIBS . 'tests' . DS . 'fixtures' . DS . 'fixturized_test_case.php';
|
||||
require_once LIBS . 'tests' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php';
|
||||
require_once LIBS . 'tests' . DS . 'Fixture' . DS . 'FixturizedTestCase.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@ App::uses('Model', 'Model');
|
|||
App::uses('AppModel', 'Model');
|
||||
App::uses('CakeHtmlReporter', 'TestSuite/Reporter');
|
||||
|
||||
require_once dirname(__FILE__) . DS . 'model' . DS . 'models.php';
|
||||
require_once dirname(dirname(__FILE__)) . DS . 'Model' . DS . 'models.php';
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -75,7 +75,7 @@ class FileTest extends CakeTestCase {
|
|||
$result = $this->File->info();
|
||||
$expecting = array(
|
||||
'dirname' => dirname(__FILE__), 'basename' => basename(__FILE__),
|
||||
'extension' => 'php', 'filename' =>'file.test'
|
||||
'extension' => 'php', 'filename' =>'FileTest'
|
||||
);
|
||||
$this->assertEqual($result, $expecting);
|
||||
|
||||
|
@ -84,7 +84,7 @@ class FileTest extends CakeTestCase {
|
|||
$this->assertEqual($result, $expecting);
|
||||
|
||||
$result = $this->File->name();
|
||||
$expecting = 'file.test';
|
||||
$expecting = 'FileTest';
|
||||
$this->assertEqual($result, $expecting);
|
||||
|
||||
$result = $this->File->md5();
|
||||
|
|
|
@ -133,7 +133,7 @@ class XmlTest extends CakeTestCase {
|
|||
$this->assertEqual($obj->firstChild->nodeName, 'tag');
|
||||
$this->assertEqual($obj->firstChild->nodeValue, 'value');
|
||||
|
||||
$xml = LIBS . 'tests' . DS . 'fixtures' . DS . 'sample.xml';
|
||||
$xml = LIBS . 'tests' . DS . 'Fixture' . DS . 'sample.xml';
|
||||
$obj = Xml::build($xml);
|
||||
$this->assertEqual($obj->getName(), 'tags');
|
||||
$this->assertEqual(count($obj), 2);
|
||||
|
@ -374,7 +374,7 @@ class XmlTest extends CakeTestCase {
|
|||
$obj = Xml::build($xml);
|
||||
$this->assertEqual(Xml::toArray($obj), array('tag' => 'name'));
|
||||
|
||||
$xml = LIBS . 'tests' . DS . 'fixtures' . DS . 'sample.xml';
|
||||
$xml = LIBS . 'tests' . DS . 'Fixture' . DS . 'sample.xml';
|
||||
$obj = Xml::build($xml);
|
||||
$expected = array(
|
||||
'tags' => array(
|
||||
|
@ -516,7 +516,7 @@ class XmlTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testRss() {
|
||||
$rss = file_get_contents(LIBS . 'tests' . DS . 'fixtures' . DS . 'rss.xml');
|
||||
$rss = file_get_contents(LIBS . 'tests' . DS . 'Fixture' . DS . 'rss.xml');
|
||||
$rssAsArray = Xml::toArray(Xml::build($rss));
|
||||
$this->assertEqual($rssAsArray['rss']['@version'], '2.0');
|
||||
$this->assertEqual(count($rssAsArray['rss']['channel']['item']), 2);
|
||||
|
@ -647,7 +647,7 @@ class XmlTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testSoap() {
|
||||
$xmlRequest = Xml::build(LIBS . 'tests' . DS . 'fixtures' . DS . 'soap_request.xml');
|
||||
$xmlRequest = Xml::build(LIBS . 'tests' . DS . 'Fixture' . DS . 'soap_request.xml');
|
||||
$expected = array(
|
||||
'Envelope' => array(
|
||||
'@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding',
|
||||
|
@ -660,7 +660,7 @@ class XmlTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertEqual(Xml::toArray($xmlRequest), $expected);
|
||||
|
||||
$xmlResponse = Xml::build(LIBS . 'tests' . DS . 'fixtures' . DS . 'soap_response.xml');
|
||||
$xmlResponse = Xml::build(LIBS . 'tests' . DS . 'Fixture' . DS . 'soap_response.xml');
|
||||
$expected = array(
|
||||
'Envelope' => array(
|
||||
'@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding',
|
||||
|
|
Loading…
Add table
Reference in a new issue