From a978fb2661aaa3bc59c8fa60a7c99931ee4831df Mon Sep 17 00:00:00 2001 From: AD7six Date: Thu, 5 Jun 2008 15:20:45 +0000 Subject: [PATCH] adding Doc blocks to everything in tests folder missed in the first pass. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7126 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/dispatcher.test.php | 250 +++-- cake/tests/cases/libs/cache.test.php | 19 +- cake/tests/cases/libs/cache/apc.test.php | 14 +- cake/tests/cases/libs/cache/file.test.php | 7 +- cake/tests/cases/libs/cache/memcache.test.php | 14 +- cake/tests/cases/libs/cache/xcache.test.php | 14 +- cake/tests/cases/libs/class_registry.test.php | 21 +- .../cases/libs/code_coverage_manager.test.php | 43 +- cake/tests/cases/libs/configure.test.php | 14 +- .../cases/libs/controller/component.test.php | 52 +- .../libs/controller/components/acl.test.php | 49 +- .../libs/controller/components/auth.test.php | 49 +- .../libs/controller/components/email.test.php | 14 +- .../components/request_handler.test.php | 28 +- .../controller/components/security.test.php | 49 +- .../controller/components/session.test.php | 21 +- .../cases/libs/controller/controller.test.php | 42 +- .../cases/libs/controller/scaffold.test.php | 28 +- cake/tests/cases/libs/debugger.test.php | 44 +- cake/tests/cases/libs/error.test.php | 55 +- cake/tests/cases/libs/file.test.php | 78 +- cake/tests/cases/libs/folder.test.php | 53 +- cake/tests/cases/libs/i18n.test.php | 84 +- cake/tests/cases/libs/inflector.test.php | 35 +- cake/tests/cases/libs/model/behavior.test.php | 56 +- .../libs/model/behaviors/containable.test.php | 37 +- .../libs/model/behaviors/translate.test.php | 28 +- .../cases/libs/model/behaviors/tree.test.php | 91 +- .../model/datasources/dbo/dbo_adodb.test.php | 7 +- .../model/datasources/dbo/dbo_mssql.test.php | 21 +- .../model/datasources/dbo/dbo_mysql.test.php | 7 +- .../model/datasources/dbo/dbo_oracle.test.php | 7 +- .../datasources/dbo/dbo_postgres.test.php | 14 +- .../model/datasources/dbo_source.test.php | 112 ++- cake/tests/cases/libs/model/db_acl.test.php | 49 +- cake/tests/cases/libs/model/model.test.php | 84 +- cake/tests/cases/libs/model/models.php | 865 +++++++++++++++++- cake/tests/cases/libs/model/schema.test.php | 111 ++- cake/tests/cases/libs/object.test.php | 21 +- cake/tests/cases/libs/router.test.php | 77 +- cake/tests/cases/libs/sanitize.test.php | 14 +- cake/tests/cases/libs/security.test.php | 29 +- cake/tests/cases/libs/session.test.php | 87 +- cake/tests/cases/libs/set.test.php | 79 +- cake/tests/cases/libs/socket.test.php | 21 +- cake/tests/cases/libs/validation.test.php | 112 ++- cake/tests/cases/libs/view/helper.test.php | 28 +- .../cases/libs/view/helpers/ajax.test.php | 35 +- .../cases/libs/view/helpers/cache.test.php | 7 +- .../cases/libs/view/helpers/form.test.php | 71 +- .../cases/libs/view/helpers/html.test.php | 28 +- .../libs/view/helpers/javascript.test.php | 21 +- .../tests/cases/libs/view/helpers/js.test.php | 7 +- .../cases/libs/view/helpers/number.test.php | 14 +- .../libs/view/helpers/paginator.test.php | 14 +- .../cases/libs/view/helpers/rss.test.php | 79 +- .../cases/libs/view/helpers/session.test.php | 21 +- .../cases/libs/view/helpers/text.test.php | 28 +- .../cases/libs/view/helpers/time.test.php | 35 +- .../cases/libs/view/helpers/xml.test.php | 93 +- cake/tests/cases/libs/view/theme.test.php | 21 +- cake/tests/cases/libs/view/view.test.php | 42 +- cake/tests/cases/libs/xml.test.php | 367 ++++---- cake/tests/fixtures/aco_action_fixture.php | 6 + cake/tests/fixtures/ad_fixture.php | 11 +- cake/tests/fixtures/advertisement_fixture.php | 6 + .../fixtures/another_article_fixture.php | 6 + cake/tests/fixtures/apple_fixture.php | 10 +- cake/tests/fixtures/aro_fixture.php | 7 +- cake/tests/fixtures/aros_aco_fixture.php | 6 + cake/tests/fixtures/aros_aco_two_fixture.php | 20 +- .../fixtures/article_featured_fixture.php | 6 + cake/tests/fixtures/article_fixture.php | 6 + cake/tests/fixtures/articles_tag_fixture.php | 6 + cake/tests/fixtures/attachment_fixture.php | 6 + cake/tests/fixtures/auth_user_fixture.php | 6 + cake/tests/fixtures/author_fixture.php | 6 + cake/tests/fixtures/bid_fixture.php | 6 + cake/tests/fixtures/callback_fixture.php | 10 +- cake/tests/fixtures/campaign_fixture.php | 15 +- cake/tests/fixtures/category_fixture.php | 6 + .../fixtures/category_thread_fixture.php | 6 + cake/tests/fixtures/comment_fixture.php | 6 + cake/tests/fixtures/data_test_fixture.php | 6 + cake/tests/fixtures/datatype_fixture.php | 7 +- cake/tests/fixtures/dependency_fixture.php | 14 +- cake/tests/fixtures/device_fixture.php | 6 + .../fixtures/device_type_category_fixture.php | 6 + cake/tests/fixtures/device_type_fixture.php | 6 + .../fixtures/document_directory_fixture.php | 10 +- cake/tests/fixtures/document_fixture.php | 6 + .../exterior_type_category_fixture.php | 6 + cake/tests/fixtures/feature_set_fixture.php | 6 + cake/tests/fixtures/featured_fixture.php | 6 + cake/tests/fixtures/home_fixture.php | 10 +- cake/tests/fixtures/image_fixture.php | 6 + cake/tests/fixtures/item_fixture.php | 6 + .../fixtures/items_portfolio_fixture.php | 6 + cake/tests/fixtures/join_a_b_fixture.php | 7 +- cake/tests/fixtures/join_a_c_fixture.php | 7 +- cake/tests/fixtures/join_a_fixture.php | 7 +- cake/tests/fixtures/join_b_fixture.php | 7 +- cake/tests/fixtures/join_c_fixture.php | 7 +- cake/tests/fixtures/join_thing_fixture.php | 11 +- cake/tests/fixtures/message_fixture.php | 6 + cake/tests/fixtures/node_fixture.php | 6 + .../fixtures/numeric_article_fixture.php | 10 +- cake/tests/fixtures/person_fixture.php | 7 +- cake/tests/fixtures/portfolio_fixture.php | 6 + cake/tests/fixtures/post_fixture.php | 6 + cake/tests/fixtures/posts_tag_fixture.php | 7 +- cake/tests/fixtures/primary_model_fixture.php | 6 + cake/tests/fixtures/product_fixture.php | 10 +- cake/tests/fixtures/project_fixture.php | 6 + cake/tests/fixtures/sample_fixture.php | 6 + .../fixtures/secondary_model_fixture.php | 6 + cake/tests/fixtures/session_fixture.php | 7 +- .../tests/fixtures/something_else_fixture.php | 7 +- cake/tests/fixtures/something_fixture.php | 7 +- cake/tests/fixtures/stories_tag_fixture.php | 6 + cake/tests/fixtures/story_fixture.php | 6 + cake/tests/fixtures/syfile_fixture.php | 6 + cake/tests/fixtures/tag_fixture.php | 6 + .../fixtures/the_paper_monkies_fixture.php | 6 + cake/tests/fixtures/thread_fixture.php | 10 +- .../fixtures/translate_table_fixture.php | 12 +- .../fixtures/translated_item_fixture.php | 6 + .../fixtures/underscore_field_fixture.php | 7 +- cake/tests/fixtures/user_fixture.php | 6 + cake/tests/fixtures/uuid_fixture.php | 6 + cake/tests/groups/components.group.php | 7 +- cake/tests/groups/lib.group.php | 7 +- cake/tests/groups/lib_controller.group.php | 7 +- 133 files changed, 3641 insertions(+), 787 deletions(-) diff --git a/cake/tests/cases/dispatcher.test.php b/cake/tests/cases/dispatcher.test.php index 9985740c7..acf87f261 100644 --- a/cake/tests/cases/dispatcher.test.php +++ b/cake/tests/cases/dispatcher.test.php @@ -30,17 +30,17 @@ require_once CAKE.'dispatcher.php'; App::import('Core', 'AppController'); /** * TestDispatcher class - * + * * @package cake * @subpackage cake.tests.cases */ class TestDispatcher extends Dispatcher { /** * invoke method - * - * @param mixed $controller - * @param mixed $params - * @param mixed $missingAction + * + * @param mixed $controller + * @param mixed $params + * @param mixed $missingAction * @access protected * @return void */ @@ -65,8 +65,8 @@ class TestDispatcher extends Dispatcher { } /** * cakeError method - * - * @param mixed $filename + * + * @param mixed $filename * @access public * @return void */ @@ -77,7 +77,7 @@ class TestDispatcher extends Dispatcher { } /** * MyPluginAppController class - * + * * @package cake * @subpackage cake.tests.cases */ @@ -86,28 +86,28 @@ class MyPluginAppController extends AppController { } /** * MyPluginController class - * + * * @package cake * @subpackage cake.tests.cases */ class MyPluginController extends MyPluginAppController { /** * name property - * + * * @var string 'MyPlugin' * @access public */ var $name = 'MyPlugin'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * index method - * + * * @access public * @return void */ @@ -116,7 +116,7 @@ class MyPluginController extends MyPluginAppController { } /** * add method - * + * * @access public * @return void */ @@ -125,8 +125,8 @@ class MyPluginController extends MyPluginAppController { } /** * admin_add method - * - * @param mixed $id + * + * @param mixed $id * @access public * @return void */ @@ -136,29 +136,29 @@ class MyPluginController extends MyPluginAppController { } /** * SomePagesController class - * + * * @package cake * @subpackage cake.tests.cases */ class SomePagesController extends AppController { /** * name property - * + * * @var string 'SomePages' * @access public */ var $name = 'SomePages'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * display method - * - * @param mixed $page + * + * @param mixed $page * @access public * @return void */ @@ -167,7 +167,7 @@ class SomePagesController extends AppController { } /** * index method - * + * * @access public * @return void */ @@ -177,29 +177,29 @@ class SomePagesController extends AppController { } /** * OtherPagesController class - * + * * @package cake * @subpackage cake.tests.cases */ class OtherPagesController extends MyPluginAppController { /** * name property - * + * * @var string 'OtherPages' * @access public */ var $name = 'OtherPages'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * display method - * - * @param mixed $page + * + * @param mixed $page * @access public * @return void */ @@ -208,7 +208,7 @@ class OtherPagesController extends MyPluginAppController { } /** * index method - * + * * @access public * @return void */ @@ -218,28 +218,28 @@ class OtherPagesController extends MyPluginAppController { } /** * TestDispatchPagesController class - * + * * @package cake * @subpackage cake.tests.cases */ class TestDispatchPagesController extends AppController { /** * name property - * + * * @var string 'TestDispatchPages' * @access public */ var $name = 'TestDispatchPages'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * admin_index method - * + * * @access public * @return void */ @@ -249,7 +249,7 @@ class TestDispatchPagesController extends AppController { } /** * ArticlesTestAppController class - * + * * @package cake * @subpackage cake.tests.cases */ @@ -258,28 +258,28 @@ class ArticlesTestAppController extends AppController { } /** * ArticlesTestController class - * + * * @package cake * @subpackage cake.tests.cases */ class ArticlesTestController extends ArticlesTestAppController { /** * name property - * + * * @var string 'ArticlesTest' * @access public */ var $name = 'ArticlesTest'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * admin_index method - * + * * @access public * @return void */ @@ -289,35 +289,35 @@ class ArticlesTestController extends ArticlesTestAppController { } /** * SomePostsController class - * + * * @package cake * @subpackage cake.tests.cases */ class SomePostsController extends AppController { /** * name property - * + * * @var string 'SomePosts' * @access public */ var $name = 'SomePosts'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * autoRender property - * + * * @var bool false * @access public */ var $autoRender = false; /** * beforeFilter method - * + * * @access public * @return void */ @@ -327,7 +327,7 @@ class SomePostsController extends AppController { } /** * index method - * + * * @access public * @return void */ @@ -337,49 +337,49 @@ class SomePostsController extends AppController { } /** * TestCachedPagesController class - * + * * @package cake * @subpackage cake.tests.cases */ class TestCachedPagesController extends AppController { /** * name property - * + * * @var string 'TestCachedPages' * @access public */ var $name = 'TestCachedPages'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * helpers property - * + * * @var array * @access public */ var $helpers = array('Cache'); /** * cacheAction property - * + * * @var array * @access public */ var $cacheAction = array('index'=> '+2 sec', 'test_nocache_tags'=>'+2 sec'); /** * viewPath property - * + * * @var string 'posts' * @access public */ var $viewPath = 'posts'; /** * index method - * + * * @access public * @return void */ @@ -388,39 +388,39 @@ class TestCachedPagesController extends AppController { } /** * test_nocache_tags method - * + * * @access public * @return void */ function test_nocache_tags() { - //$this->cacheAction = '+2 sec'; +//$this->cacheAction = '+2 sec'; $this->render(); } } /** * TimesheetsController class - * + * * @package cake * @subpackage cake.tests.cases */ class TimesheetsController extends AppController { /** * name property - * + * * @var string 'Timesheets' * @access public */ var $name = 'Timesheets'; /** * uses property - * + * * @var array * @access public */ var $uses = array(); /** * index method - * + * * @access public * @return void */ @@ -437,7 +437,7 @@ class TimesheetsController extends AppController { class DispatcherTest extends UnitTestCase { /** * setUp method - * + * * @access public * @return void */ @@ -452,7 +452,7 @@ class DispatcherTest extends UnitTestCase { } /** * testParseParamsWithoutZerosAndEmptyPost method - * + * * @access public * @return void */ @@ -468,7 +468,7 @@ class DispatcherTest extends UnitTestCase { } /** * testParseParamsReturnsPostedData method - * + * * @access public * @return void */ @@ -481,7 +481,7 @@ class DispatcherTest extends UnitTestCase { } /** * testParseParamsWithSingleZero method - * + * * @access public * @return void */ @@ -496,7 +496,7 @@ class DispatcherTest extends UnitTestCase { } /** * testParseParamsWithManySingleZeros method - * + * * @access public * @return void */ @@ -512,7 +512,7 @@ class DispatcherTest extends UnitTestCase { } /** * testParseParamsWithManyZerosInEachSectionOfUrl method - * + * * @access public * @return void */ @@ -528,7 +528,7 @@ class DispatcherTest extends UnitTestCase { } /** * testParseParamsWithMixedOneToManyZerosInEachSectionOfUrl method - * + * * @access public * @return void */ @@ -542,9 +542,9 @@ class DispatcherTest extends UnitTestCase { $this->assertPattern('/\\A(?:000030)\\z/', $test['pass'][4]); $this->assertPattern('/\\A(?:0000400)\\z/', $test['pass'][5]); } - /** +/** * testQueryStringOnRoot method - * + * * @access public * @return void */ @@ -558,8 +558,8 @@ class DispatcherTest extends UnitTestCase { $this->assertPattern('/home/',$result['action']); $this->assertTrue(isset($result['url']['sleep'])); $this->assertTrue(isset($result['url']['coffee'])); - - + + $Dispatcher =& new Dispatcher(); $uri = '/?coffee=life&sleep=sissy'; $result = $Dispatcher->parseParams($uri); @@ -568,12 +568,12 @@ class DispatcherTest extends UnitTestCase { $this->assertTrue(isset($result['url']['sleep'])); $this->assertTrue(isset($result['url']['coffee'])); $this->assertEqual($result['url']['coffee'], 'life'); - - $_GET = $this->_get; + + $_GET = $this->_get; } /** * testFileUploadArrayStructure method - * + * * @access public * @return void */ @@ -672,7 +672,7 @@ class DispatcherTest extends UnitTestCase { } /** * testGetUrl method - * + * * @access public * @return void */ @@ -706,11 +706,11 @@ class DispatcherTest extends UnitTestCase { $result = $Dispatcher->getUrl($uri); $expected = '?/home'; $this->assertEqual($expected, $result); - + } /** * testBaseUrlAndWebrootWithModRewrite method - * + * * @access public * @return void */ @@ -785,7 +785,7 @@ class DispatcherTest extends UnitTestCase { } /** * testBaseUrlwithModRewriteAlias method - * + * * @access public * @return void */ @@ -819,7 +819,7 @@ class DispatcherTest extends UnitTestCase { } /** * testBaseUrlAndWebrootWithBaseUrl method - * + * * @access public * @return void */ @@ -888,7 +888,7 @@ class DispatcherTest extends UnitTestCase { } /** * testBaseUrlAndWebrootWithBase method - * + * * @access public * @return void */ @@ -918,7 +918,7 @@ class DispatcherTest extends UnitTestCase { } /** * testMissingController method - * + * * @access public * @return void */ @@ -933,7 +933,7 @@ class DispatcherTest extends UnitTestCase { } /** * testPrivate method - * + * * @access public * @return void */ @@ -948,7 +948,7 @@ class DispatcherTest extends UnitTestCase { } /** * testMissingAction method - * + * * @access public * @return void */ @@ -963,7 +963,7 @@ class DispatcherTest extends UnitTestCase { } /** * testDispatch method - * + * * @access public * @return void */ @@ -1012,7 +1012,7 @@ class DispatcherTest extends UnitTestCase { } /** * testAdminDispatch method - * + * * @access public * @return void */ @@ -1042,7 +1042,7 @@ class DispatcherTest extends UnitTestCase { } /** * testPluginDispatch method - * + * * @access public * @return void */ @@ -1087,7 +1087,7 @@ class DispatcherTest extends UnitTestCase { } /** * testAutomaticPluginDispatch method - * + * * @access public * @return void */ @@ -1124,7 +1124,7 @@ class DispatcherTest extends UnitTestCase { } /** * testAutomaticPluginControllerDispatch method - * + * * @access public * @return void */ @@ -1196,7 +1196,12 @@ class DispatcherTest extends UnitTestCase { ); $this->assertEqual($controller->params, $expected); } - +/** + * testAutomaticPluginControllerMissingActionDispatch method + * + * @access public + * @return void + */ function testAutomaticPluginControllerMissingActionDispatch() { $_POST = array(); $_SERVER['PHP_SELF'] = '/cake/repo/branches/1.2.x.x/index.php'; @@ -1211,7 +1216,12 @@ class DispatcherTest extends UnitTestCase { $expected = 'missingAction'; $this->assertIdentical($expected, $controller); } - +/** + * testPrefixProtection method + * + * @access public + * @return void + */ function testPrefixProtection() { $_POST = array(); $_SERVER['PHP_SELF'] = '/cake/repo/branches/1.2.x.x/index.php'; @@ -1228,7 +1238,12 @@ class DispatcherTest extends UnitTestCase { $expected = 'privateAction'; $this->assertIdentical($expected, $controller); } - +/** + * testChangingParamsFromBeforeFilter method + * + * @access public + * @return void + */ function testChangingParamsFromBeforeFilter() { $Dispatcher =& new TestDispatcher(); $url = 'some_posts/index/param:value/param2:value2'; @@ -1243,7 +1258,12 @@ class DispatcherTest extends UnitTestCase { $expected = array('changed'); $this->assertIdentical($expected, $controller->params['pass']); } - +/** + * testStaticAssets method + * + * @access public + * @return void + */ function testStaticAssets() { Router::reload(); $Configure = Configure::getInstance(); @@ -1261,17 +1281,22 @@ class DispatcherTest extends UnitTestCase { $Dispatcher->cached('css/test_asset.css'); $result = ob_get_clean(); $this->assertEqual('this is the test asset css file', $result); - + Configure::write('debug', 0); $Dispatcher->params = $Dispatcher->parseParams('test_plugin/css/test_plugin_asset.css'); ob_start(); $Dispatcher->cached('test_plugin/css/test_plugin_asset.css'); $result = ob_get_clean(); $this->assertEqual('this is the test plugin asset css file', $result); - - header('Content-type: text/html'); //reset the header content-type without page can render as plain text. - } + header('Content-type: text/html');//reset the header content-type without page can render as plain text. + } +/** + * testFullPageCachingDispatch method + * + * @access public + * @return void + */ function testFullPageCachingDispatch() { Configure::write('Cache.disable', false); Configure::write('Cache.check', true); @@ -1361,7 +1386,12 @@ class DispatcherTest extends UnitTestCase { $filename = CACHE . 'views' . DS . Inflector::slug($dispatcher->here) . '.php'; unlink($filename); } - +/** + * testHttpMethodOverrides method + * + * @access public + * @return void + */ function testHttpMethodOverrides() { Router::reload(); Router::mapResources('Posts'); @@ -1409,7 +1439,12 @@ class DispatcherTest extends UnitTestCase { unset($_POST['_method']); } - +/** + * testEnvironmentDetection method + * + * @access public + * @return void + */ function testEnvironmentDetection() { $dispatcher =& new Dispatcher(); @@ -1509,7 +1544,12 @@ class DispatcherTest extends UnitTestCase { } $this->__loadEnvironment(array_merge(array('reload' => true), $backup)); } - +/** + * backupEnvironment method + * + * @access private + * @return void + */ function __backupEnvironment() { return array( 'App' => Configure::read('App'), @@ -1518,7 +1558,12 @@ class DispatcherTest extends UnitTestCase { 'SERVER'=> $_SERVER ); } - +/** + * reloadEnvironment method + * + * @access private + * @return void + */ function __reloadEnvironment() { foreach ($_GET as $key => $val) { unset($_GET[$key]); @@ -1531,7 +1576,13 @@ class DispatcherTest extends UnitTestCase { } Configure::write('App', array()); } - +/** + * loadEnvironment method + * + * @param mixed $env + * @access private + * @return void + */ function __loadEnvironment($env) { if ($env['reload']) { $this->__reloadEnvironment(); @@ -1559,7 +1610,12 @@ class DispatcherTest extends UnitTestCase { } } } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { $_GET = $this->_get; } diff --git a/cake/tests/cases/libs/cache.test.php b/cake/tests/cases/libs/cache.test.php index 702bfcc91..23f525f93 100644 --- a/cake/tests/cases/libs/cache.test.php +++ b/cake/tests/cases/libs/cache.test.php @@ -38,7 +38,7 @@ if (!class_exists('Cache')) { class CacheTest extends CakeTestCase { /** * start method - * + * * @access public * @return void */ @@ -48,7 +48,7 @@ class CacheTest extends CakeTestCase { } /** * end method - * + * * @access public * @return void */ @@ -57,7 +57,7 @@ class CacheTest extends CakeTestCase { } /** * testConfig method - * + * * @access public * @return void */ @@ -68,7 +68,7 @@ class CacheTest extends CakeTestCase { } /** * testConfigChange method - * + * * @access public * @return void */ @@ -81,7 +81,7 @@ class CacheTest extends CakeTestCase { } /** * testWritingWithConfig method - * + * * @access public * @return void */ @@ -104,7 +104,7 @@ class CacheTest extends CakeTestCase { } /** * testInitSettings method - * + * * @access public * @return void */ @@ -122,7 +122,12 @@ class CacheTest extends CakeTestCase { ); $this->assertEqual($settings, $expecting); } - +/** + * testWriteEmptyValues method + * + * @access public + * @return void + */ function testWriteEmptyValues() { return; Cache::engine('File', array('path' => TMP . 'tests')); diff --git a/cake/tests/cases/libs/cache/apc.test.php b/cake/tests/cases/libs/cache/apc.test.php index 91dde86ca..55fe0b3f0 100644 --- a/cake/tests/cases/libs/cache/apc.test.php +++ b/cake/tests/cases/libs/cache/apc.test.php @@ -104,7 +104,12 @@ class ApcEngineTest extends UnitTestCase { $result = Cache::read('other_test'); $this->assertFalse($result); } - +/** + * testDeleteCache method + * + * @access public + * @return void + */ function testDeleteCache() { $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('delete_test', $data); @@ -113,7 +118,12 @@ class ApcEngineTest extends UnitTestCase { $result = Cache::delete('delete_test'); $this->assertTrue($result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { Cache::config('default'); } diff --git a/cake/tests/cases/libs/cache/file.test.php b/cake/tests/cases/libs/cache/file.test.php index f79e36e84..a5f27bbb2 100644 --- a/cake/tests/cases/libs/cache/file.test.php +++ b/cake/tests/cases/libs/cache/file.test.php @@ -284,7 +284,12 @@ class FileEngineTest extends CakeTestCase { $result = Cache::clear(); $this->assertTrue($result); } - +/** + * testRemoveWindowsSlashesFromCache method + * + * @access public + * @return void + */ function testRemoveWindowsSlashesFromCache() { $File = new File(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'tmp' . DS . 'dir_map'); $File->read(11); diff --git a/cake/tests/cases/libs/cache/memcache.test.php b/cake/tests/cases/libs/cache/memcache.test.php index 6e4eace52..19029247b 100644 --- a/cake/tests/cases/libs/cache/memcache.test.php +++ b/cake/tests/cases/libs/cache/memcache.test.php @@ -138,7 +138,12 @@ class MemcacheEngineTest extends UnitTestCase { $result = Cache::read('other_test'); $this->assertFalse($result); } - +/** + * testDeleteCache method + * + * @access public + * @return void + */ function testDeleteCache() { $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('delete_test', $data); @@ -147,7 +152,12 @@ class MemcacheEngineTest extends UnitTestCase { $result = Cache::delete('delete_test'); $this->assertTrue($result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { Cache::config('default'); } diff --git a/cake/tests/cases/libs/cache/xcache.test.php b/cake/tests/cases/libs/cache/xcache.test.php index 21690cf18..180eefe2e 100644 --- a/cake/tests/cases/libs/cache/xcache.test.php +++ b/cake/tests/cases/libs/cache/xcache.test.php @@ -121,7 +121,12 @@ class XcacheEngineTest extends UnitTestCase { $result = Cache::read('other_test'); $this->assertFalse($result); } - +/** + * testDeleteCache method + * + * @access public + * @return void + */ function testDeleteCache() { $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('delete_test', $data); @@ -130,7 +135,12 @@ class XcacheEngineTest extends UnitTestCase { $result = Cache::delete('delete_test'); $this->assertTrue($result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { Cache::config('default'); } diff --git a/cake/tests/cases/libs/class_registry.test.php b/cake/tests/cases/libs/class_registry.test.php index d7a9e7b03..4da31f99c 100644 --- a/cake/tests/cases/libs/class_registry.test.php +++ b/cake/tests/cases/libs/class_registry.test.php @@ -165,7 +165,12 @@ class ClassRegistryTest extends UnitTestCase { $this->assertTrue($TagCopy->name === 'SomeOtherName'); } - +/** + * testClassRegistryFlush method + * + * @access public + * @return void + */ function testClassRegistryFlush () { $ArticleTag = ClassRegistry::getObject('RegisterArticleTag'); $this->assertTrue(is_a($ArticleTag, 'RegisterArticleTag')); @@ -175,7 +180,12 @@ class ClassRegistryTest extends UnitTestCase { $this->assertFalse($NoArticleTag); $this->assertTrue(is_a($ArticleTag, 'RegisterArticleTag')); } - +/** + * testAddMultiplModels method + * + * @access public + * @return void + */ function testAddMultiplModels () { $Article = ClassRegistry::isKeySet('Article'); $this->assertFalse($Article); @@ -211,7 +221,12 @@ class ClassRegistryTest extends UnitTestCase { $Tag = ClassRegistry::getObject('Tag'); $this->assertTrue(is_a($Tag, 'RegisterArticleTag')); } - +/** + * testPluginAppModel method + * + * @access public + * @return void + */ function testPluginAppModel() { $TestRegistryPluginModel = ClassRegistry::isKeySet('TestRegistryPluginModel'); $this->assertFalse($TestRegistryPluginModel); diff --git a/cake/tests/cases/libs/code_coverage_manager.test.php b/cake/tests/cases/libs/code_coverage_manager.test.php index dc1054c8d..a41bd78aa 100644 --- a/cake/tests/cases/libs/code_coverage_manager.test.php +++ b/cake/tests/cases/libs/code_coverage_manager.test.php @@ -46,7 +46,7 @@ class CodeCoverageManagerTest extends UnitTestCase { } /** * testNoTestCaseSupplied method - * + * * @access public * @return void */ @@ -71,8 +71,8 @@ class CodeCoverageManagerTest extends UnitTestCase { $contents = $folder->ls(); /** * remove method - * - * @param mixed $var + * + * @param mixed $var * @access public * @return void */ @@ -90,7 +90,7 @@ class CodeCoverageManagerTest extends UnitTestCase { } /** * testGetTestObjectFileNameFromTestCaseFile method - * + * * @access public * @return void */ @@ -127,7 +127,7 @@ class CodeCoverageManagerTest extends UnitTestCase { } /** * testOfHtmlReport method - * + * * @access public * @return void */ @@ -136,19 +136,19 @@ class CodeCoverageManagerTest extends UnitTestCase { $code = <<value = func_get_args(); } } - /** +/** * Returns the contents of the Set object * * @return array @@ -169,7 +169,7 @@ class CodeCoverageManagerTest extends UnitTestCase { function &get() { return \$this->value; } - /** +/** * This function can be thought of as a hybrid between PHP's array_merge and array_merge_recursive. The difference * to the two is that if an array key contains another array then the function behaves recursive (unlike array_merge) * but does not do if for keys containing strings (unlike array_merge_recursive). See the unit test for more information. @@ -284,7 +284,7 @@ PHP; } /** * testOfHtmlDiffReport method - * + * * @access public * @return void */ @@ -293,19 +293,19 @@ PHP; $code = <<value = func_get_args(); } } - /** +/** * Returns the contents of the Set object * * @return array @@ -326,7 +326,7 @@ PHP; function &get() { return \$this->value; } - /** +/** * This function can be thought of as a hybrid between PHP's array_merge and array_merge_recursive. The difference * to the two is that if an array key contains another array then the function behaves recursive (unlike array_merge) * but does not do if for keys containing strings (unlike array_merge_recursive). See the unit test for more information. @@ -543,7 +543,7 @@ PHP; } /** * testArrayStrrpos method - * + * * @access public * @return void */ @@ -575,7 +575,7 @@ PHP; } /** * testGetExecutableLines method - * + * * @access public * @return void */ @@ -610,7 +610,12 @@ HTML; $this->assertIdentical(trim($line), ''); } } - +/** + * testCalculateCodeCoverage method + * + * @access public + * @return void + */ function testCalculateCodeCoverage() { $manager =& CodeCoverageManager::getInstance(); $data = array( diff --git a/cake/tests/cases/libs/configure.test.php b/cake/tests/cases/libs/configure.test.php index 706eeb66f..7db8a7e9e 100644 --- a/cake/tests/cases/libs/configure.test.php +++ b/cake/tests/cases/libs/configure.test.php @@ -406,7 +406,12 @@ class AppImportTest extends UnitTestCase { $file = App::import('File', 'AnotherNewName', false, array(LIBS), 'config.php'); $this->assertFalse($file); } - +/** + * testLoadingWithSearchArray method + * + * @access public + * @return void + */ function testLoadingWithSearchArray () { $type = array('type' => 'File', 'name' => 'RandomName', 'parent' => false, 'file' => 'config.php', 'search' => array(TEST_CAKE_CORE_INCLUDE_PATH )); $file = App::import($type); @@ -416,7 +421,12 @@ class AppImportTest extends UnitTestCase { $file = App::import($type); $this->assertFalse($file); } - +/** + * testMultipleLoading method + * + * @access public + * @return void + */ function testMultipleLoading() { $toLoad = array('I18n', 'Socket'); diff --git a/cake/tests/cases/libs/controller/component.test.php b/cake/tests/cases/libs/controller/component.test.php index 71271c77f..4ff5718fd 100644 --- a/cake/tests/cases/libs/controller/component.test.php +++ b/cake/tests/cases/libs/controller/component.test.php @@ -29,10 +29,40 @@ App::import('Core', array('Component', 'Controller')); if (!class_exists('AppController')) { +/** + * AppController class + * + * @package cake + * @subpackage cake.tests.cases.libs.controller + */ class AppController extends Controller { +/** + * name property + * + * @var string 'App' + * @access public + */ var $name = 'App'; +/** + * uses property + * + * @var array + * @access public + */ var $uses = array(); +/** + * helpers property + * + * @var array + * @access public + */ var $helpers = array(); +/** + * components property + * + * @var array + * @access public + */ var $components = array('Orange' => array('colour' => 'blood orange')); } @@ -46,10 +76,28 @@ if (!class_exists('AppController')) { * @package cake.tests.cases.libs.controller */ class ParamTestComponent extends Object { +/** + * name property + * + * @var string 'ParamTest' + * @access public + */ var $name = 'ParamTest'; - + /** + * components property + * + * @var array + * @access public + */ var $components = array('Banana' => array('config' => 'value')); - + /** + * initialize method + * + * @param mixed $controller + * @param mixed $settings + * @access public + * @return void + */ function initialize(&$controller, $settings) { foreach ($settings as $key => $value) { if (is_numeric($key)) { diff --git a/cake/tests/cases/libs/controller/components/acl.test.php b/cake/tests/cases/libs/controller/components/acl.test.php index a7baa55e4..3f01df797 100644 --- a/cake/tests/cases/libs/controller/components/acl.test.php +++ b/cake/tests/cases/libs/controller/components/acl.test.php @@ -465,32 +465,57 @@ class AclComponentTest extends CakeTestCase { $this->expectError('DbAcl::allow() - Invalid node'); $this->assertFalse($this->Acl->deny('Bobs', 'ROOT/printers/DoesNotExist', 'create')); } - +/** + * testStartup method + * + * @access public + * @return void + */ function testStartup() { $controller = new Controller(); $this->assertTrue($this->Acl->startup($controller)); } /* The following tests and AclComponent methods are not fully implemented yet - +/** + * testDbSetAro method + * + * @access public + * @return void + */ function testDbSetAro() { //This method is not implemented in either IniAcl or DbAcl //$result = $this->Acl->setAro('Samir'); //$this->assertEqual($result, $expected); } - +/** + * testDbSetAco method + * + * @access public + * @return void + */ function testDbSetAco() { //This method is not implemented in either IniAcl or DbAcl //$result = $this->Acl->getAco('printers'); //$this->assertEqual($result, $expected); } - +/** + * testDbGetAro method + * + * @access public + * @return void + */ function testDbGetAro() { //This method is not implemented in either IniAcl or DbAcl //$result = $this->Acl->getAro('Samir'); //$this->assertEqual($result, $expected); } - +/** + * testDbGetAco method + * + * @access public + * @return void + */ function testDbGetAco() { //This method is not implemented in either IniAcl or DbAcl //$result = $this->Acl->getAco('tpsReports'); @@ -539,7 +564,12 @@ class AclComponentTest extends CakeTestCase { ); $this->assertEqual($result, $expected); } - +/** + * testIniCheck method + * + * @access public + * @return void + */ function testIniCheck() { Configure::write('Acl.classname', 'IniAclTest'); unset($this->Acl); @@ -559,7 +589,12 @@ class AclComponentTest extends CakeTestCase { $this->assertFalse($this->Acl->check('nobody', 'comments')); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Acl); } diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/cake/tests/cases/libs/controller/components/auth.test.php index 1913d77b2..8d11f47e1 100644 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -633,7 +633,12 @@ class AuthTest extends CakeTestCase { $_SERVER['HTTP_REFERER'] = $backup; $this->Controller->Session->del('Auth'); } - +/** + * testEmptyUsernameOrPassword method + * + * @access public + * @return void + */ function testEmptyUsernameOrPassword() { $this->AuthUser =& new AuthUser(); $user['id'] = 1; @@ -659,7 +664,12 @@ class AuthTest extends CakeTestCase { $this->assertEqual($user, false); $this->Controller->Session->del('Auth'); } - +/** + * testInjection method + * + * @access public + * @return void + */ function testInjection() { $this->AuthUser =& new AuthUser(); Configure::write('debug', 1); @@ -697,7 +707,12 @@ class AuthTest extends CakeTestCase { $this->Controller->Auth->startup($this->Controller); $this->assertTrue(is_null($this->Controller->Auth->user())); } - +/** + * testCustomRoute method + * + * @access public + * @return void + */ function testCustomRoute() { Router::reload(); Router::connect('/:lang/:controller/:action/*', array('lang' => null), array('lang' => '[a-z]{2,3}')); @@ -721,7 +736,12 @@ class AuthTest extends CakeTestCase { $user = $this->Controller->Auth->user(); $this->assertTrue(!!$user); } - +/** + * testAdminRoute method + * + * @access public + * @return void + */ function testAdminRoute() { Router::reload(); $admin = Configure::read('Routing.admin'); @@ -750,7 +770,12 @@ class AuthTest extends CakeTestCase { Configure::write('Routing.admin', $admin); } - +/** + * testAjaxLogin method + * + * @access public + * @return void + */ function testAjaxLogin() { Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS)); $_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest"; @@ -767,7 +792,12 @@ class AuthTest extends CakeTestCase { $this->assertNoPattern('/Added Record/', $result); unset($_SERVER['HTTP_X_REQUESTED_WITH']); } - +/** + * testLoginActionRedirect method + * + * @access public + * @return void + */ function testLoginActionRedirect() { Router::reload(); $admin = Configure::read('Routing.admin'); @@ -798,7 +828,12 @@ class AuthTest extends CakeTestCase { Configure::write('Routing.admin', $admin); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Controller, $this->AuthUser); } diff --git a/cake/tests/cases/libs/controller/components/email.test.php b/cake/tests/cases/libs/controller/components/email.test.php index db9152278..ef0751f76 100644 --- a/cake/tests/cases/libs/controller/components/email.test.php +++ b/cake/tests/cases/libs/controller/components/email.test.php @@ -238,7 +238,12 @@ TEMPDOC; $this->assertEqual($this->Controller->Session->read('Message.email.message'), $expect); } } - +/** + * testSendDebug method + * + * @access public + * @return void + */ function testSendDebug() { if (@fsockopen('localhost', 25)) { $this->assertTrue(@fsockopen('localhost', 25), 'Local mail server is running'); @@ -253,7 +258,12 @@ TEMPDOC; $this->assertTrue($this->Controller->Email->send('This is the body of the message')); } } - +/** + * testContentStripping method + * + * @access public + * @return void + */ function testContentStripping() { $content = "Previous content\n--alt-\nContent-TypeContent-Type:: text/html; charsetcharset==utf-8\nContent-Transfer-Encoding: 7bit"; $content .= "\n\n

My own html content

"; diff --git a/cake/tests/cases/libs/controller/components/request_handler.test.php b/cake/tests/cases/libs/controller/components/request_handler.test.php index a5518e434..c11d47b8b 100644 --- a/cake/tests/cases/libs/controller/components/request_handler.test.php +++ b/cake/tests/cases/libs/controller/components/request_handler.test.php @@ -302,7 +302,12 @@ class RequestHandlerComponentTest extends CakeTestCase { $this->assertFalse($this->RequestHandler->isPut()); $this->assertTrue($this->RequestHandler->isDelete()); } - +/** + * testClientContentPreference method + * + * @access public + * @return void + */ function testClientContentPreference() { $_SERVER['HTTP_ACCEPT'] = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,*/*'; $this->_init(); @@ -321,7 +326,12 @@ class RequestHandlerComponentTest extends CakeTestCase { $this->_init(); $this->assertEqual($this->RequestHandler->prefers(), 'html'); } - +/** + * testCustomContent method + * + * @access public + * @return void + */ function testCustomContent() { $_SERVER['HTTP_ACCEPT'] = 'text/x-mobile,text/html;q=0.9,text/plain;q=0.8,*/*;q=0.5'; $this->_init(); @@ -334,7 +344,12 @@ class RequestHandlerComponentTest extends CakeTestCase { $this->RequestHandler->startup($this->Controller); $this->assertEqual($this->RequestHandler->prefers(), 'mobile'); } - +/** + * testClientProperties method + * + * @access public + * @return void + */ function testClientProperties() { $_SERVER['HTTP_HOST'] = 'localhost:80'; $this->assertEqual($this->RequestHandler->getReferrer(), 'localhost'); @@ -356,7 +371,12 @@ class RequestHandlerComponentTest extends CakeTestCase { $_SERVER['HTTP_CLIENTADDRESS'] = '10.0.1.2, 10.0.1.1'; $this->assertEqual($this->RequestHandler->getClientIP(), '10.0.1.2'); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->RequestHandler); unset($this->Controller); diff --git a/cake/tests/cases/libs/controller/components/security.test.php b/cake/tests/cases/libs/controller/components/security.test.php index 6e84a6bef..d8dda48a0 100644 --- a/cake/tests/cases/libs/controller/components/security.test.php +++ b/cake/tests/cases/libs/controller/components/security.test.php @@ -619,11 +619,21 @@ DIGEST; $data['Model3']['valid'] = '0'; $this->assertTrue($this->Controller->data == $data); } - +/** + * testLoginValidation method + * + * @access public + * @return void + */ function testLoginValidation() { } - +/** + * testValidateHasManyModel method + * + * @access public + * @return void + */ function testValidateHasManyModel() { $this->Controller->Security->startup($this->Controller); $key = $this->Controller->params['_Token']['key']; @@ -664,7 +674,12 @@ DIGEST; $this->assertTrue($this->Controller->data == $data); } - +/** + * testLoginRequest method + * + * @access public + * @return void + */ function testLoginRequest() { $this->Controller->Security->startup($this->Controller); $realm = 'cakephp.org'; @@ -679,7 +694,12 @@ DIGEST; $this->assertPattern('/realm="'.$realm.'"/', $result); $this->assertPattern('/qop="auth"/', $result); } - +/** + * testGenerateDigestResponseHash method + * + * @access public + * @return void + */ function testGenerateDigestResponseHash() { $this->Controller->Security->startup($this->Controller); $realm = 'cakephp.org'; @@ -704,7 +724,12 @@ DIGEST; md5(env('REQUEST_METHOD') . ':' . $data['uri'])); $this->assertIdentical($result, $expected); } - +/** + * testLoginCredentials method + * + * @access public + * @return void + */ function testLoginCredentials() { $this->Controller->Security->startup($this->Controller); $_SERVER['PHP_AUTH_USER'] = $user = 'Willy Test'; @@ -740,7 +765,12 @@ DIGEST; $this->assertIdentical($result, $expected); } } - +/** + * testParseDigestAuthData method + * + * @access public + * @return void + */ function testParseDigestAuthData() { $this->Controller->Security->startup($this->Controller); $digest = <<Controller->Security->parseDigestAuthData(''); $this->assertNull($result); } +/** + * sortFields method + * + * @param mixed $fields + * @access private + * @return void + */ function __sortFields($fields) { foreach ($fields as $key => $value) { if ($key[0] != '_' && is_array($fields[$key])) { diff --git a/cake/tests/cases/libs/controller/components/session.test.php b/cake/tests/cases/libs/controller/components/session.test.php index bbb6effa4..fc2a62d99 100644 --- a/cake/tests/cases/libs/controller/components/session.test.php +++ b/cake/tests/cases/libs/controller/components/session.test.php @@ -245,7 +245,12 @@ class SessionComponentTest extends CakeTestCase { $this->assertNull($Session->id()); unset($_SESSION); } - + /** + * testSessionCheck method + * + * @access public + * @return void + */ function testSessionCheck() { $Session =& new SessionComponent(); @@ -263,7 +268,12 @@ class SessionComponentTest extends CakeTestCase { Configure::write('Session.start', true); unset($_SESSION); } - + /** + * testSessionFlash method + * + * @access public + * @return void + */ function testSessionFlash() { $Session =& new SessionComponent(); @@ -281,7 +291,12 @@ class SessionComponentTest extends CakeTestCase { $Session->setFlash('This is a test message', 'non_existing_layout'); $this->assertEqual($Session->read('Message.myFlash'), array('message' => 'This is a test message', 'layout' => 'default', 'params' => array())); } - + /** + * testSessionDestroy method + * + * @access public + * @return void + */ function testSessionDestroy() { $Session =& new SessionComponent(); diff --git a/cake/tests/cases/libs/controller/controller.test.php b/cake/tests/cases/libs/controller/controller.test.php index 9e6d837d4..dcc5abe37 100644 --- a/cake/tests/cases/libs/controller/controller.test.php +++ b/cake/tests/cases/libs/controller/controller.test.php @@ -564,7 +564,12 @@ class ControllerTest extends CakeTestCase { $MockController->redirect($url, (int) $code, false); } } - +/** + * testMergeVars method + * + * @access public + * @return void + */ function testMergeVars() { $this->skipIf(defined('AppControllerExists'), 'MergeVars will be skipped as it needs a non-existent AppController. As the an AppController class exists, this cannot be run.'); @@ -591,7 +596,12 @@ class ControllerTest extends CakeTestCase { $this->assertEqual(count(array_diff($TestController->uses, $uses)), 0); $this->assertEqual(count(array_diff_assoc(Set::normalize($TestController->components), Set::normalize($components))), 0); } - +/** + * testReferer method + * + * @access public + * @return void + */ function testReferer() { $Controller =& new Controller(); $_SERVER['HTTP_REFERER'] = 'http://cakephp.org'; @@ -625,20 +635,35 @@ class ControllerTest extends CakeTestCase { $expected = '/some/path'; $this->assertIdentical($result, $expected); } - +/** + * testSetAction method + * + * @access public + * @return void + */ function testSetAction() { $TestController =& new TestController(); $TestController->setAction('index', 1, 2); $expected = array('testId' => 1, 'test2Id' => 2); $this->assertidentical($TestController->data, $expected); } - +/** + * testUnimplementedIsAuthorized method + * + * @access public + * @return void + */ function testUnimplementedIsAuthorized() { $TestController =& new TestController(); $TestController->isAuthorized(); $this->assertError(); } - +/** + * testValidateErrors method + * + * @access public + * @return void + */ function testValidateErrors() { $TestController =& new TestController(); $TestController->constructClasses(); @@ -654,7 +679,12 @@ class ControllerTest extends CakeTestCase { $this->assertIdentical($result, $expected); $this->assertEqual($TestController->validate($comment), 2); } - +/** + * testPostConditions method + * + * @access public + * @return void + */ function testPostConditions() { $Controller =& new Controller(); diff --git a/cake/tests/cases/libs/controller/scaffold.test.php b/cake/tests/cases/libs/controller/scaffold.test.php index 943a4022a..850410829 100644 --- a/cake/tests/cases/libs/controller/scaffold.test.php +++ b/cake/tests/cases/libs/controller/scaffold.test.php @@ -90,13 +90,28 @@ class TestScaffoldView extends ScaffoldView { * @subpackage cake.tests.cases.libs.controller */ class ScaffoldViewTest extends CakeTestCase { - +/** + * fixtures property + * + * @var array + * @access public + */ var $fixtures = array('core.post'); - +/** + * setUp method + * + * @access public + * @return void + */ function setUp() { $this->Controller = new ScaffoldMockController(); } - +/** + * testGetViewFilename method + * + * @access public + * @return void + */ function testGetViewFilename() { $this->Controller->action = 'index'; $ScaffoldView =& new TestScaffoldView($this->Controller); @@ -108,7 +123,12 @@ class ScaffoldViewTest extends CakeTestCase { $expected = 'cake' . DS . 'libs' . DS . 'view' . DS . 'errors' . DS . 'scaffold_error.ctp'; $this->assertEqual($result, $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Controller); } diff --git a/cake/tests/cases/libs/debugger.test.php b/cake/tests/cases/libs/debugger.test.php index 272dc9a85..eaa562b9a 100644 --- a/cake/tests/cases/libs/debugger.test.php +++ b/cake/tests/cases/libs/debugger.test.php @@ -35,10 +35,10 @@ App::import('Core', 'Debugger'); */ class DebuggerTest extends UnitTestCase { - //do not move code below or it change line numbers which are used in the tests +//do not move code below or it change line numbers which are used in the tests /** * setUp method - * + * * @access public * @return void */ @@ -52,9 +52,9 @@ class DebuggerTest extends UnitTestCase { } } } - /** +/** * testDocRef method - * + * * @access public * @return void */ @@ -66,7 +66,7 @@ class DebuggerTest extends UnitTestCase { } /** * testOutput method - * + * * @access public * @return void */ @@ -76,22 +76,22 @@ class DebuggerTest extends UnitTestCase { $this->assertEqual($result, ''); $out .= ''; $result = Debugger::output(true); - + $this->assertEqual($result[0]['error'], 'Notice'); $this->assertEqual($result[0]['description'], 'Undefined variable: out'); $this->assertPattern('/DebuggerTest::testOutput/', $result[0]['trace']); $this->assertPattern('/SimpleInvoker::invoke/', $result[0]['trace']); - + ob_start(); Debugger::output('txt'); $other .= ''; $result = ob_get_clean(); - + $this->assertPattern('/Undefined variable: other/', $result); $this->assertPattern('/Context:/', $result); $this->assertPattern('/DebuggerTest::testOutput/', $result); $this->assertPattern('/SimpleInvoker::invoke/', $result); - + ob_start(); Debugger::output('html'); $wrong .= ''; @@ -99,7 +99,7 @@ class DebuggerTest extends UnitTestCase { $this->assertPattern('/
.+<\/pre>/', $result);
 		$this->assertPattern('/Notice<\/b>/', $result);
 		$this->assertPattern('/variable: wrong/', $result);
-		
+
 		ob_start();
 		Debugger::output('js');
 		$buzz .= '';
@@ -108,12 +108,12 @@ class DebuggerTest extends UnitTestCase {
 		$this->assertPattern('/Notice<\/b>/', $result);
 		$this->assertPattern('/Undefined variable: buzz/', $result);
 		$this->assertPattern('/]+>Code<\/a>/', $result);
-		$this->assertPattern('/]+>Context<\/a>/', $result);		
+		$this->assertPattern('/]+>Context<\/a>/', $result);
 		set_error_handler('simpleTestErrorHandler');
 	}
 /**
  * testTrimPath method
- * 
+ *
  * @access public
  * @return void
  */
@@ -123,7 +123,7 @@ class DebuggerTest extends UnitTestCase {
 	}
 /**
  * testExportVar method
- * 
+ *
  * @access public
  * @return void
  */
@@ -174,7 +174,7 @@ class DebuggerTest extends UnitTestCase {
 	}
 /**
  * testLog method
- * 
+ *
  * @access public
  * @return void
  */
@@ -198,7 +198,12 @@ class DebuggerTest extends UnitTestCase {
 		$this->assertPattern('/"whatever",/', $result);
 		$this->assertPattern('/"here"/', $result);
 	}
-	
+/**
+ * testDump method
+ * 
+ * @access public
+ * @return void
+ */
 	function testDump() {
 		$var = array('People' => array(
 					array(
@@ -210,7 +215,7 @@ class DebuggerTest extends UnitTestCase {
 					'name' => 'Shaft',
 					'coat' => 'black',
 					'hair' => 'black'
-					)	
+					)
 				)
 			);
 		ob_start();
@@ -219,7 +224,12 @@ class DebuggerTest extends UnitTestCase {
 		$expected = "
array(\n\t\"People\" => array()\n)
"; $this->assertEqual($expected, $result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { Configure::write('log', true); } diff --git a/cake/tests/cases/libs/error.test.php b/cake/tests/cases/libs/error.test.php index 7c12ed658..ec3c7c3fa 100644 --- a/cake/tests/cases/libs/error.test.php +++ b/cake/tests/cases/libs/error.test.php @@ -66,6 +66,12 @@ class OrangeComponent extends Object { * @subpackage cake.tests.cases.libs */ if (!class_exists('AppController')) { +/** + * AppController class + * + * @package cake + * @subpackage cake.tests.cases.libs + */ class AppController extends Controller { /** * components property @@ -326,7 +332,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern("/pages\/about.ctp/", $expected); } - +/** + * testMissingLayout method + * + * @access public + * @return void + */ function testMissingLayout() { restore_error_handler(); ob_start(); @@ -341,7 +352,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern("/layouts\/my_layout.ctp/", $expected); } - +/** + * testMissingConnection method + * + * @access public + * @return void + */ function testMissingConnection() { ob_start(); $TestErrorHandler = new TestErrorHandler('missingConnection', array( @@ -351,7 +367,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern('/

Missing Database Connection<\/h2>/', $result); $this->assertPattern('/Article requires a database connection/', $result); } - +/** + * testMissingHelperFile method + * + * @access public + * @return void + */ function testMissingHelperFile() { ob_start(); $TestErrorHandler = new TestErrorHandler('missingHelperFile', array( @@ -363,7 +384,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern('/Create the class below in file:/', $result); $this->assertPattern('/\/my_custom.php/', $result); } - +/** + * testMissingHelperClass method + * + * @access public + * @return void + */ function testMissingHelperClass() { ob_start(); $TestErrorHandler = new TestErrorHandler('missingHelperClass', array( @@ -375,7 +401,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern('/The helper class MyCustomHelper<\/em> can not be found or does not exist./', $result); $this->assertPattern('/\/my_custom.php/', $result); } - +/** + * testMissingComponentFile method + * + * @access public + * @return void + */ function testMissingComponentFile() { ob_start(); $TestErrorHandler = new TestErrorHandler('missingComponentFile', array( @@ -388,7 +419,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern('/Create the class SideboxComponent<\/em> in file:/', $result); $this->assertPattern('/\/sidebox.php/', $result); } - +/** + * testMissingComponentClass method + * + * @access public + * @return void + */ function testMissingComponentClass() { ob_start(); $TestErrorHandler = new TestErrorHandler('missingComponentClass', array( @@ -401,7 +437,12 @@ class TestErrorHandlerTest extends CakeTestCase { $this->assertPattern('/Create the class SideboxComponent<\/em> in file:/', $result); $this->assertPattern('/\/sidebox.php/', $result); } - +/** + * testMissingModel method + * + * @access public + * @return void + */ function testMissingModel() { ob_start(); $TestErrorHandler = new TestErrorHandler('missingModel', array( diff --git a/cake/tests/cases/libs/file.test.php b/cake/tests/cases/libs/file.test.php index 820d57e42..34abba992 100644 --- a/cake/tests/cases/libs/file.test.php +++ b/cake/tests/cases/libs/file.test.php @@ -384,7 +384,13 @@ class FileTest extends UnitTestCase { $result = $TmpFile->delete(); $this->assertFalse($result); } - +/** + * getTmpFile method + * + * @param bool $paintSkip + * @access protected + * @return void + */ function _getTmpFile($paintSkip = true) { $tmpFile = TMP.'tests'.DS.'cakephp.file.test.tmp'; if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) { @@ -406,61 +412,111 @@ class FileTest extends UnitTestCase { } return false; } - +/** + * testGetFullPathIsDeprecated method + * + * @access public + * @return void + */ function testGetFullPathIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getFullPath(); $this->assertError(); } - +/** + * testGetNameIsDeprecated method + * + * @access public + * @return void + */ function testGetNameIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getName(); $this->assertError(); } - +/** + * testFilenameIsDeprecated method + * + * @access public + * @return void + */ function testFilenameIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->filename(); $this->assertError(); } - +/** + * testGetExtIsDeprecated method + * + * @access public + * @return void + */ function testGetExtIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getExt(); $this->assertError(); } - +/** + * testGetMd5IsDeprecated method + * + * @access public + * @return void + */ function testGetMd5IsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getMd5(); $this->assertError(); } - +/** + * testGetSizeIsDeprecated method + * + * @access public + * @return void + */ function testGetSizeIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getSize(); $this->assertError(); } - +/** + * testGetOwnerIsDeprecated method + * + * @access public + * @return void + */ function testGetOwnerIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getOwner(); $this->assertError(); } - +/** + * testGetGroupIsDeprecated method + * + * @access public + * @return void + */ function testGetGroupIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getGroup(); $this->assertError(); } - +/** + * testGetChmodIsDeprecated method + * + * @access public + * @return void + */ function testGetChmodIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getChmod(); $this->assertError(); } - +/** + * testGetFolderIsDeprecated method + * + * @access public + * @return void + */ function testGetFolderIsDeprecated() { $someFile =& new File('some_file.txt', false); $someFile->getFolder(); diff --git a/cake/tests/cases/libs/folder.test.php b/cake/tests/cases/libs/folder.test.php index c932422fd..0738b1764 100644 --- a/cake/tests/cases/libs/folder.test.php +++ b/cake/tests/cases/libs/folder.test.php @@ -37,14 +37,14 @@ App::import('Core', 'File'); class FolderTest extends UnitTestCase { /** * Folder property - * + * * @var mixed null * @access public */ var $Folder = null; /** * testBasic method - * + * * @access public * @return void */ @@ -65,7 +65,7 @@ class FolderTest extends UnitTestCase { } /** * testInPath method - * + * * @access public * @return void */ @@ -92,7 +92,7 @@ class FolderTest extends UnitTestCase { } /** * testOperations method - * + * * @access public * @return void */ @@ -155,7 +155,7 @@ class FolderTest extends UnitTestCase { } /** * testRealPathForWebroot method - * + * * @access public * @return void */ @@ -165,7 +165,7 @@ class FolderTest extends UnitTestCase { } /** * testZeroAsDirectory method - * + * * @access public * @return void */ @@ -188,7 +188,7 @@ class FolderTest extends UnitTestCase { } /** * testFolderRead method - * + * * @access public * @return void */ @@ -200,7 +200,7 @@ class FolderTest extends UnitTestCase { } /** * testFolderTree method - * + * * @access public * @return void */ @@ -240,7 +240,7 @@ class FolderTest extends UnitTestCase { } /** * testWindowsPath method - * + * * @access public * @return void */ @@ -251,7 +251,7 @@ class FolderTest extends UnitTestCase { } /** * testIsAbsolute method - * + * * @access public * @return void */ @@ -263,7 +263,7 @@ class FolderTest extends UnitTestCase { } /** * testIsSlashTerm method - * + * * @access public * @return void */ @@ -275,7 +275,7 @@ class FolderTest extends UnitTestCase { } /** * testStatic method - * + * * @access public * @return void */ @@ -285,7 +285,7 @@ class FolderTest extends UnitTestCase { } /** * testNormalizePath method - * + * * @access public * @return void */ @@ -304,7 +304,7 @@ class FolderTest extends UnitTestCase { } /** * correctSlashFor method - * + * * @access public * @return void */ @@ -323,7 +323,7 @@ class FolderTest extends UnitTestCase { } /** * testInCakePath method - * + * * @access public * @return void */ @@ -347,7 +347,7 @@ class FolderTest extends UnitTestCase { } /** * testFind method - * + * * @access public * @return void */ @@ -382,7 +382,12 @@ class FolderTest extends UnitTestCase { $this->assertIdentical($result, $expected); $folder->delete($folder->pwd().DS.'testme'); } - +/** + * testFindRecursive method + * + * @access public + * @return void + */ function testFindRecursive() { $folder =& new Folder(); $folder->cd(TEST_CAKE_CORE_INCLUDE_PATH); @@ -414,14 +419,24 @@ class FolderTest extends UnitTestCase { $folder->cd(TEST_CAKE_CORE_INCLUDE_PATH.'config'); $folder->delete($folder->pwd().DS.'testme'); } - +/** + * testConstructWithNonExistantPath method + * + * @access public + * @return void + */ function testConstructWithNonExistantPath() { $folder =& new Folder(TEST_CAKE_CORE_INCLUDE_PATH.'config_non_existant', true); $this->assertTrue(is_dir(TEST_CAKE_CORE_INCLUDE_PATH.'config_non_existant')); $folder->cd(TEST_CAKE_CORE_INCLUDE_PATH); $folder->delete($folder->pwd().'config_non_existant'); } - +/** + * testDirSize method + * + * @access public + * @return void + */ function testDirSize() { $folder =& new Folder(TEST_CAKE_CORE_INCLUDE_PATH.'config_non_existant', true); $this->assertEqual($folder->dirSize(), 0); diff --git a/cake/tests/cases/libs/i18n.test.php b/cake/tests/cases/libs/i18n.test.php index 955ba34f1..1488eb91f 100644 --- a/cake/tests/cases/libs/i18n.test.php +++ b/cake/tests/cases/libs/i18n.test.php @@ -1724,23 +1724,48 @@ class I18nTest extends UnitTestCase { function testMoRulesTwelve() { } - +/** + * testPoRulesThirteen method + * + * @access public + * @return void + */ function testPoRulesThirteen() { } - +/** + * testMoRulesThirteen method + * + * @access public + * @return void + */ function testMoRulesThirteen() { } - +/** + * testPoRulesFourteen method + * + * @access public + * @return void + */ function testPoRulesFourteen() { } - +/** + * testMoRulesFourteen method + * + * @access public + * @return void + */ function testMoRulesFourteen() { } - +/** + * testSetLanguageWithSession method + * + * @access public + * @return void + */ function testSetLanguageWithSession () { $_SESSION['Config']['language'] = 'po'; $singular = $this->__Singular(); @@ -1775,7 +1800,12 @@ class I18nTest extends UnitTestCase { $this->assertTrue(in_array('25 everything else (po translated)', $plurals)); unset($_SESSION['Config']['language']); } - +/** + * testNoCoreTranslation method + * + * @access public + * @return void + */ function testNoCoreTranslation () { Configure::write('Config.language', 'po'); $singular = $this->__Singular(); @@ -1812,7 +1842,12 @@ class I18nTest extends UnitTestCase { $this->assertFalse(in_array('24 everything else (from core translated)', $corePlurals)); $this->assertFalse(in_array('25 everything else (from core translated)', $corePlurals)); } - +/** + * testPoMultipleLineTranslation method + * + * @access public + * @return void + */ function testPoMultipleLineTranslation () { Configure::write('Config.language', 'po'); $string = <<assertEqual($result, $expected); } - +/** + * testPoNoTranslationNeeded method + * + * @access public + * @return void + */ function testPoNoTranslationNeeded () { Configure::write('Config.language', 'po'); $result = __('No Translation needed', true); $this->assertEqual($result, 'No Translation needed'); } - +/** + * Singular method + * + * @access private + * @return void + */ function __Singular() { $singular = __('Plural Rule 1', true); return $singular; } - +/** + * Plural method + * + * @access private + * @return void + */ function __Plural() { $plurals = array(); for ($number = 0; $number <= 25; $number++) { @@ -1849,12 +1899,22 @@ EOD; } return $plurals; } - +/** + * singularFromCore method + * + * @access private + * @return void + */ function __singularFromCore() { $singular = __('Plural Rule 1 (from core)', true); return $singular; } - +/** + * pluralFromCore method + * + * @access private + * @return void + */ function __pluralFromCore() { for ($number = 0; $number <= 25; $number++) { $plurals[] = sprintf(__n('%d = 1 (from core)', '%d = 0 or > 1 (from core)', $number, true), $number ); diff --git a/cake/tests/cases/libs/inflector.test.php b/cake/tests/cases/libs/inflector.test.php index 842223016..493c0534f 100644 --- a/cake/tests/cases/libs/inflector.test.php +++ b/cake/tests/cases/libs/inflector.test.php @@ -190,32 +190,57 @@ class InflectorTest extends UnitTestCase { $expected = 'this-melts-your-face1-2-3'; $this->assertEqual($result, $expected); } - +/** + * testVariableNaming method + * + * @access public + * @return void + */ function testVariableNaming() { $this->assertEqual(Inflector::variable('test_field'), 'testField'); $this->assertEqual(Inflector::variable('test_fieLd'), 'testFieLd'); $this->assertEqual(Inflector::variable('test field'), 'testField'); $this->assertEqual(Inflector::variable('Test_field'), 'testField'); } - +/** + * testClassNaming method + * + * @access public + * @return void + */ function testClassNaming() { $this->assertEqual(Inflector::classify('artists_genres'), 'ArtistsGenre'); $this->assertEqual(Inflector::classify('file_systems'), 'FileSystem'); $this->assertEqual(Inflector::classify('news'), 'News'); } - +/** + * testTableNaming method + * + * @access public + * @return void + */ function testTableNaming() { $this->assertEqual(Inflector::tableize('ArtistsGenre'), 'artists_genres'); $this->assertEqual(Inflector::tableize('FileSystem'), 'file_systems'); $this->assertEqual(Inflector::tableize('News'), 'news'); } - +/** + * testHumanization method + * + * @access public + * @return void + */ function testHumanization() { $this->assertEqual(Inflector::humanize('posts'), 'Posts'); $this->assertEqual(Inflector::humanize('posts_tags'), 'Posts Tags'); $this->assertEqual(Inflector::humanize('file_systems'), 'File Systems'); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Inflector); } diff --git a/cake/tests/cases/libs/model/behavior.test.php b/cake/tests/cases/libs/model/behavior.test.php index a7551393f..ee37553c0 100644 --- a/cake/tests/cases/libs/model/behavior.test.php +++ b/cake/tests/cases/libs/model/behavior.test.php @@ -766,7 +766,12 @@ class BehaviorTest extends CakeTestCase { $Sample->create(); $this->assertIdentical($Sample->save($record2), $expected); } - +/** + * testBehaviorDeleteCallbacks method + * + * @access public + * @return void + */ function testBehaviorDeleteCallbacks() { $Apple = new Apple(); @@ -795,7 +800,12 @@ class BehaviorTest extends CakeTestCase { $this->assertIdentical($results, true); } } - + /** + * testBehaviorOnErrorCallback method + * + * @access public + * @return void + */ function testBehaviorOnErrorCallback() { $Apple = new Apple(); @@ -810,7 +820,12 @@ class BehaviorTest extends CakeTestCase { $this->assertIdentical(trim(ob_get_clean()), 'onError trigger success'); } } - + /** + * testBehaviorValidateCallback method + * + * @access public + * @return void + */ function testBehaviorValidateCallback() { $Apple = new Apple(); @@ -833,7 +848,12 @@ class BehaviorTest extends CakeTestCase { $Apple->validates(); $this->assertIdentical($Apple->whitelist, array('unknown', 'name')); } - +/** + * testBehaviorValidateMethods method + * + * @access public + * @return void + */ function testBehaviorValidateMethods() { $Apple = new Apple(); $Apple->Behaviors->attach('Test'); @@ -846,7 +866,12 @@ class BehaviorTest extends CakeTestCase { $result = $Apple->save(array('name' => 'Regular Apple', 'color' => 'Red')); $this->assertFalse($result); } - +/** + * testBehaviorMethodDispatching method + * + * @access public + * @return void + */ function testBehaviorMethodDispatching() { $Apple = new Apple(); $Apple->Behaviors->attach('Test'); @@ -862,7 +887,12 @@ class BehaviorTest extends CakeTestCase { $expected = "Item.name = 'the remote' AND Location.name = 'the couch'"; $this->assertEqual($result, $expected); } - +/** + * testBehaviorMethodDispatchingWithData method + * + * @access public + * @return void + */ function testBehaviorMethodDispatchingWithData() { $Apple = new Apple(); $Apple->Behaviors->attach('Test'); @@ -871,7 +901,12 @@ class BehaviorTest extends CakeTestCase { $this->assertTrue($Apple->testData()); $this->assertTrue($Apple->data['Apple']['field_2']); } - +/** + * testBehaviorTrigger method + * + * @access public + * @return void + */ function testBehaviorTrigger() { $Apple = new Apple(); $Apple->Behaviors->attach('Test'); @@ -893,7 +928,12 @@ class BehaviorTest extends CakeTestCase { $expected = array('TestBehavior', 'Test2Behavior'); $this->assertIdentical($Apple->beforeTestResult, $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { ClassRegistry::flush(); } diff --git a/cake/tests/cases/libs/model/behaviors/containable.test.php b/cake/tests/cases/libs/model/behaviors/containable.test.php index 4a145aaaa..d666578da 100644 --- a/cake/tests/cases/libs/model/behaviors/containable.test.php +++ b/cake/tests/cases/libs/model/behaviors/containable.test.php @@ -3171,7 +3171,12 @@ class ContainableTest extends CakeTestCase { $this->assertTrue(Set::matches('/Comment[article_id=1]', $r)); $this->assertTrue(Set::matches('/Comment[id=1]', $r)); } - + /** + * testOriginalAssociations method + * + * @access public + * @return void + */ function testOriginalAssociations() { $this->Article->Comment->Behaviors->attach('Containable'); @@ -3246,7 +3251,14 @@ class ContainableTest extends CakeTestCase { )); $this->assertEqual($result, $expected); } - +/** + * containments method + * + * @param mixed $Model + * @param array $contain + * @access private + * @return void + */ function __containments(&$Model, $contain = array()) { if (!is_array($Model)) { $result = $Model->containments($contain); @@ -3260,7 +3272,14 @@ class ContainableTest extends CakeTestCase { return $result; } - +/** + * assertBindings method + * + * @param mixed $Model + * @param array $expected + * @access private + * @return void + */ function __assertBindings(&$Model, $expected = array()) { $expected = array_merge(array('belongsTo' => array(), 'hasOne' => array(), 'hasMany' => array(), 'hasAndBelongsToMany' => array()), $expected); @@ -3268,7 +3287,15 @@ class ContainableTest extends CakeTestCase { $this->assertEqual(array_keys($Model->$binding), $expect); } } - +/** + * bindings method + * + * @param mixed $Model + * @param array $extra + * @param bool $output + * @access private + * @return void + */ function __bindings(&$Model, $extra = array(), $output = true) { $relationTypes = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); @@ -3302,4 +3329,4 @@ class ContainableTest extends CakeTestCase { } } -?> \ No newline at end of file +?> diff --git a/cake/tests/cases/libs/model/behaviors/translate.test.php b/cake/tests/cases/libs/model/behaviors/translate.test.php index 754dc75c6..ab2cab2c4 100644 --- a/cake/tests/cases/libs/model/behaviors/translate.test.php +++ b/cake/tests/cases/libs/model/behaviors/translate.test.php @@ -525,7 +525,12 @@ class TranslateTest extends CakeTestCase { $this->Model->unbindTranslation($translations); $this->Model->bindTranslation(array('title', 'content'), false); } - +/** + * testMultipleUpdate method + * + * @access public + * @return void + */ function testMultipleUpdate() { $this->Model->locale = 'eng'; $this->Model->validate['title'] = VALID_NOT_EMPTY; @@ -559,7 +564,12 @@ class TranslateTest extends CakeTestCase { $this->Model->unbindTranslation($translations); $this->Model->bindTranslation(array('title', 'content'), false); } - +/** + * testMixedCreateUpdateWithArrayLocale method + * + * @access public + * @return void + */ function testMixedCreateUpdateWithArrayLocale() { $this->Model->locale = array('cze', 'deu'); $data = array('TranslatedItem' => array( @@ -594,7 +604,12 @@ class TranslateTest extends CakeTestCase { $this->Model->unbindTranslation($translations); $this->Model->bindTranslation(array('title', 'content'), false); } - +/** + * testAttachDetach method + * + * @access public + * @return void + */ function testAttachDetach() { $Behavior = $this->Model->Behaviors->Translate; @@ -640,7 +655,12 @@ class TranslateTest extends CakeTestCase { $this->Model->unbindTranslation($translations); $this->Model->bindTranslation(array('title', 'content'), false); } - +/** + * testAnotherTranslateTable method + * + * @access public + * @return void + */ function testAnotherTranslateTable() { $Model =& new TranslatedItemWithTable(); $Model->locale = 'eng'; diff --git a/cake/tests/cases/libs/model/behaviors/tree.test.php b/cake/tests/cases/libs/model/behaviors/tree.test.php index 26044af9f..8cbca4eec 100644 --- a/cake/tests/cases/libs/model/behaviors/tree.test.php +++ b/cake/tests/cases/libs/model/behaviors/tree.test.php @@ -980,7 +980,12 @@ class NumberTreeCase extends CakeTestCase { $validTree = $this->NumberTree->verify(); $this->assertIdentical($validTree, true); } - +/** + * testRemove method + * + * @access public + * @return void + */ function testRemove() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1006,7 +1011,12 @@ class NumberTreeCase extends CakeTestCase { $validTree = $this->NumberTree->verify(); $this->assertIdentical($validTree, true); } - +/** + * testRemoveLastTopParent method + * + * @access public + * @return void + */ function testRemoveLastTopParent() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1033,7 +1043,12 @@ class NumberTreeCase extends CakeTestCase { $validTree = $this->NumberTree->verify(); $this->assertIdentical($validTree, true); } - +/** + * testRemoveAndDelete method + * + * @access public + * @return void + */ function testRemoveAndDelete() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1059,7 +1074,12 @@ class NumberTreeCase extends CakeTestCase { $validTree = $this->NumberTree->verify(); $this->assertIdentical($validTree, true); } - +/** + * testChildren method + * + * @access public + * @return void + */ function testChildren() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1081,7 +1101,12 @@ class NumberTreeCase extends CakeTestCase { array('NumberTree' => array('id' => 7, 'name' => '1.2.2', 'parent_id' => 5, 'lft' => 11, 'rght' => 12))); $this->assertEqual($total, $expects); } - +/** + * testCountChildren method + * + * @access public + * @return void + */ function testCountChildren() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1096,7 +1121,12 @@ class NumberTreeCase extends CakeTestCase { $total = $this->NumberTree->childCount(); $this->assertEqual($total, 6); } - +/** + * testGetParentNode method + * + * @access public + * @return void + */ function testGetParentNode() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1108,7 +1138,12 @@ class NumberTreeCase extends CakeTestCase { $expects = array('NumberTree' => array('name' => '1.2')); $this->assertIdentical($result, $expects); } - +/** + * testGetPath method + * + * @access public + * @return void + */ function testGetPath() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(2, 2); @@ -1122,7 +1157,12 @@ class NumberTreeCase extends CakeTestCase { array('NumberTree' => array('name' => '1.2.2'))); $this->assertIdentical($result, $expects); } - +/** + * testNoAmbiguousColumn method + * + * @access public + * @return void + */ function testNoAmbiguousColumn() { $this->NumberTree =& new NumberTree(); $this->NumberTree->bindModel(array('belongsTo' => array('Dummy' => @@ -1148,7 +1188,12 @@ class NumberTreeCase extends CakeTestCase { ); $this->assertEqual($total, $expects); } - +/** + * testReorderTree method + * + * @access public + * @return void + */ function testReorderTree() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(3, 3); @@ -1170,7 +1215,12 @@ class NumberTreeCase extends CakeTestCase { $sortedNodes = $this->NumberTree->find('list', array('order' => 'lft')); $this->assertIdentical($nodes, $sortedNodes); } - +/** + * testGenerateTreeListWithSelfJoin method + * + * @access public + * @return void + */ function testGenerateTreeListWithSelfJoin() { $this->NumberTree =& new NumberTree(); $this->NumberTree->bindModel(array('belongsTo' => array('Dummy' => @@ -1181,7 +1231,12 @@ class NumberTreeCase extends CakeTestCase { $expected = array(1 => '1. Root', 2 => '_1.1', 3 => '__1.1.1', 4 => '__1.1.2', 5 => '_1.2', 6 => '__1.2.1', 7 => '__1.2.2'); $this->assertIdentical($result, $expected); } - +/** + * testMoveUpWithScope method + * + * @access public + * @return void + */ function testMoveUpWithScope() { $this->Ad =& new Ad(); $this->Ad->Behaviors->attach('Tree', array('scope'=>'Campaign')); @@ -1192,7 +1247,12 @@ class NumberTreeCase extends CakeTestCase { $this->assertEqual(Set::extract('/Ad/id', $result), array(6, 5)); $this->assertEqual(Set::extract('/Campaign/id', $result), array(2, 2)); } - +/** + * testMoveDownWithScope method + * + * @access public + * @return void + */ function testMoveDownWithScope() { $this->Ad =& new Ad(); $this->Ad->Behaviors->attach('Tree', array('scope'=>'Campaign')); @@ -1203,7 +1263,12 @@ class NumberTreeCase extends CakeTestCase { $this->assertEqual(Set::extract('/Ad/id', $result), array(5, 6)); $this->assertEqual(Set::extract('/Campaign/id', $result), array(2, 2)); } - +/** + * testArraySyntax method + * + * @access public + * @return void + */ function testArraySyntax() { $this->NumberTree =& new NumberTree(); $this->NumberTree->initialize(3, 3); diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php index eb343a0b1..c61b01e25 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php @@ -273,7 +273,12 @@ class DboAdodbTest extends CakeTestCase { $result = $this->db->value('00010010001'); $this->assertEqual($expected, $result); } - +/** + * testColumns method + * + * @access public + * @return void + */ function testColumns() { } diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php index 54ab48970..2d86ae273 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php @@ -229,7 +229,12 @@ class DboMssqlTest extends CakeTestCase { $result = $this->db->value('1,2', 'float'); $this->assertIdentical($expected, $result); } - +/** + * testDistinctFields method + * + * @access public + * @return void + */ function testDistinctFields() { $result = $this->db->fields($this->model, null, array('DISTINCT Car.country_code')); $expected = array('DISTINCT [Car].[country_code] AS [Car__0]'); @@ -239,7 +244,12 @@ class DboMssqlTest extends CakeTestCase { $expected = array('DISTINCT [Car].[country_code] AS [Car__1]'); $this->assertEqual($result, $expected); } - +/** + * testDistinctWithLimit method + * + * @access public + * @return void + */ function testDistinctWithLimit() { $this->db->read($this->model, array( 'fields' => array('DISTINCT MssqlTestModel.city', 'MssqlTestModel.country'), @@ -248,7 +258,12 @@ class DboMssqlTest extends CakeTestCase { $result = $this->db->getLastQuery(); $this->assertPattern('/^SELECT DISTINCT TOP 5/', $result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->model); } diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index a9ea8e0a7..2316e11b3 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -244,7 +244,12 @@ class DboMysqlTest extends CakeTestCase { $result = $this->db->value('00010010001'); $this->assertEqual($expected, $result); } - +/** + * testTinyintCasting method + * + * @access public + * @return void + */ function testTinyintCasting() { $this->db->cacheSources = $this->db->testing = false; $this->db->query('CREATE TABLE ' . $this->db->fullTableName('tinyint') . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id));'); diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php index 2afc900b5..053c18f51 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php @@ -59,7 +59,12 @@ class DboOracleTest extends CakeTestCase { $r = 'ORA-01756: quoted string not properly terminated'; $this->assertEqual($e, $r); } - +/** + * testLastErrorConnect method + * + * @access public + * @return void + */ function testLastErrorConnect() { $config = $this->db->config; $this->db->config['password'] = 'keepmeout'; diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index 174d4af27..64ae53ab2 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -249,7 +249,12 @@ class DboPostgresTest extends CakeTestCase { $result = $this->db2->value('1,2', 'float'); $this->assertIdentical($expected, $result); } - +/** + * testColumnParsing method + * + * @access public + * @return void + */ function testColumnParsing() { $this->assertEqual($this->db2->column('text'), 'text'); $this->assertEqual($this->db2->column('date'), 'date'); @@ -258,7 +263,12 @@ class DboPostgresTest extends CakeTestCase { $this->assertEqual($this->db2->column('time without time zone'), 'time'); $this->assertEqual($this->db2->column('timestamp without time zone'), 'datetime'); } - +/** + * testValueQuoting method + * + * @access public + * @return void + */ function testValueQuoting() { $this->assertEqual($this->db2->value('0', 'integer'), "'0'"); $this->assertEqual($this->db2->value('', 'integer'), "DEFAULT"); diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/cake/tests/cases/libs/model/datasources/dbo_source.test.php index 8f75c7a5d..02359911e 100644 --- a/cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -2600,7 +2600,12 @@ class DboSourceTest extends CakeTestCase { $expected = array('`TestModel`.`field` AS `AnotherName`'); $this->assertEqual($result, $expected); } - +/** + * testMergeAssociations method + * + * @access public + * @return void + */ function testMergeAssociations() { $data = array( 'Article2' => array( @@ -2864,7 +2869,12 @@ class DboSourceTest extends CakeTestCase { $this->testDb->__mergeAssociation($data, $merge, 'Tag', 'hasOne'); $this->assertEqual($data, $expected); } - +/** + * testRenderStatement method + * + * @access public + * @return void + */ function testRenderStatement() { $result = $this->testDb->renderStatement('select', array( 'fields' => 'id', 'table' => 'table', 'conditions' => 'WHERE 1=1', @@ -2884,7 +2894,12 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->renderStatement('delete', array('fields' => 'value=2', 'table' => 'table', 'conditions' => 'WHERE 1=1', 'alias' => 'alias', 'joins' => '')); $this->assertPattern('/^\s*DELETE\s+alias\s+FROM\s+table\s+AS\s+alias\s+WHERE\s+1=1\s*$/', $result); } - +/** + * testStatements method + * + * @access public + * @return void + */ function testStatements() { $Article =& ClassRegistry::init('Article'); @@ -2921,7 +2936,12 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->getLastQuery(); $this->assertPattern('/^\s*INSERT INTO\s+' . $this->testDb->fullTableName('articles') . '\s+\(`field`\)\s+VALUES\s+\(1\),\s*\(2\)\s*$/', $result); } - +/** + * testSchema method + * + * @access public + * @return void + */ function testSchema() { $Schema =& new CakeSchema(); $Schema->tables = array( @@ -2939,7 +2959,12 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->dropSchema($Schema, 'table'); $this->assertPattern('/^\s*DROP TABLE IF EXISTS\s+' . $this->testDb->fullTableName('table') . ';\s*$/s', $result); } - +/** + * testMagicMethodQuerying method + * + * @access public + * @return void + */ function testMagicMethodQuerying() { $result = $this->testDb->query('findByFieldName', array('value'), $this->Model); $expected = array('TestModel.field_name' => 'value'); @@ -2978,7 +3003,12 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->query('directCall', false, $this->Model); $this->assertFalse($result); } - +/** + * testOrderParsing method + * + * @access public + * @return void + */ function testOrderParsing() { $result = $this->testDb->order("ADDTIME(Event.time_begin, '-06:00:00') ASC"); $expected = " ORDER BY ADDTIME(`Event`.`time_begin`, '-06:00:00') ASC"; @@ -3040,7 +3070,12 @@ class DboSourceTest extends CakeTestCase { $expected = ' ORDER BY `Anuncio`.`destaque` & 2 DESC'; $this->assertEqual($result, $expected); } - +/** + * testCalculations method + * + * @access public + * @return void + */ function testCalculations() { $result = $this->testDb->calculate($this->Model, 'count'); $this->assertEqual($result, 'COUNT(*) AS `count`'); @@ -3069,7 +3104,12 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->calculate($this->Model, 'min', 'left'); $this->assertEqual($result, 'MIN(`left`) AS `left`'); } - +/** + * testLength method + * + * @access public + * @return void + */ function testLength() { $result = $this->testDb->length('varchar(255)'); $expected = 255; @@ -3107,7 +3147,12 @@ class DboSourceTest extends CakeTestCase { $expected = null; $this->assertIdentical($result, $expected); } - +/** + * testBuildIndex method + * + * @access public + * @return void + */ function testBuildIndex() { $data = array( 'PRIMARY' => array('column' => 'id') @@ -3130,7 +3175,12 @@ class DboSourceTest extends CakeTestCase { $expected = array('UNIQUE KEY MyIndex (`id`, `name`)'); $this->assertEqual($result, $expected); } - +/** + * testBuildColumn method + * + * @access public + * @return void + */ function testBuildColumn() { $this->expectError(); $data = array( @@ -3154,7 +3204,12 @@ class DboSourceTest extends CakeTestCase { $expected = '`testName` DEFAULT NULL'; $this->assertEqual($result, $expected); } - +/** + * testIntrospectType method + * + * @access public + * @return void + */ function testIntrospectType() { $this->assertEqual($this->testDb->introspectType(0), 'integer'); $this->assertEqual($this->testDb->introspectType(2), 'integer'); @@ -3308,7 +3363,12 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->value('a bc', 'string'); $this->assertEqual($result, "'a bc'"); } - +/** + * testValue method + * + * @access public + * @return void + */ function testValue() { $result = $this->testDb->value('{$__cakeForeignKey__$}'); $this->assertEqual($result, '{$__cakeForeignKey__$}'); @@ -3317,12 +3377,22 @@ class DboSourceTest extends CakeTestCase { $expected = array('\'first\'', 2, '\'third\''); $this->assertEqual($result, $expected); } - +/** + * testReconnect method + * + * @access public + * @return void + */ function testReconnect() { $this->testDb->reconnect(); $this->assertTrue($this->testDb->connected); } - +/** + * testRealQueries method + * + * @access public + * @return void + */ function testRealQueries() { $this->loadFixtures('Apple', 'Article', 'User', 'Comment', 'Tag'); @@ -3385,7 +3455,12 @@ class DboSourceTest extends CakeTestCase { $this->assertTrue(Set::matches('/Comment[id=2]', $result)); $this->assertFalse(Set::matches('/Comment[id=10]', $result)); } - +/** + * testName method + * + * @access public + * @return void + */ function testName() { $result = $this->testDb->name('name'); $expected = '`name`'; @@ -3403,7 +3478,12 @@ class DboSourceTest extends CakeTestCase { $expected = '`(sm)`'; $this->assertEqual($result, $expected); } - +/** + * testLog method + * + * @access public + * @return void + */ function testLog() { $this->testDb->logQuery('Query 1'); $this->testDb->logQuery('Query 2'); diff --git a/cake/tests/cases/libs/model/db_acl.test.php b/cake/tests/cases/libs/model/db_acl.test.php index b2619219d..2b1bada24 100644 --- a/cake/tests/cases/libs/model/db_acl.test.php +++ b/cake/tests/cases/libs/model/db_acl.test.php @@ -225,7 +225,12 @@ class DbAroUserTest extends CakeTestModel { * @subpackage cake.tests.cases.libs.controller.components */ class DbAclTest extends DbAcl { - +/** + * construct method + * + * @access private + * @return void + */ function __construct() { $this->Aro =& new DbAroTest(); $this->Aro->Permission =& new DbPermissionTest(); @@ -240,14 +245,29 @@ class DbAclTest extends DbAcl { * @subpackage cake.tests.cases.libs.controller.components.dbacl.models */ class AclNodeTest extends CakeTestCase { - +/** + * fixtures property + * + * @var array + * @access public + */ var $fixtures = array('core.aro', 'core.aco', 'core.aros_aco', 'core.aco_action', 'core.auth_user'); - +/** + * setUp method + * + * @access public + * @return void + */ function setUp() { Configure::write('Acl.classname', 'DbAclTest'); Configure::write('Acl.database', 'test_suite'); } - +/** + * testNode method + * + * @access public + * @return void + */ function testNode(){ $Aco = new DbAcoTest(); $result = Set::extract($Aco->node('Controller1'), '{n}.DbAcoTest.id'); @@ -283,7 +303,12 @@ class AclNodeTest extends CakeTestCase { $result = $Aco->node(''); $this->assertEqual($result, null); } - + /** + * testNodeArrayFind method + * + * @access public + * @return void + */ function testNodeArrayFind() { $Aro = new DbAroTest(); Configure::write('DbAclbindMode', 'string'); @@ -296,7 +321,12 @@ class AclNodeTest extends CakeTestCase { $expected = array(4); $this->assertEqual($result, $expected); } - + /** + * testNodeObjectFind method + * + * @access public + * @return void + */ function testNodeObjectFind() { $Aro = new DbAroTest(); $Model = new DbAroUserTest(); @@ -311,7 +341,12 @@ class AclNodeTest extends CakeTestCase { $this->assertEqual($result, $expected); } - +/** + * testNodeAliasParenting method + * + * @access public + * @return void + */ function testNodeAliasParenting() { $Aco = new DbAcoTest(); $db =& ConnectionManager::getDataSource('test_suite'); diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index 855b12426..c26d3b50f 100644 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -4305,7 +4305,12 @@ class ModelTest extends CakeTestCase { $expected = array('Apple'=> array('mytime'=> '03:04:04')); $this->assertEqual($TestModel->data, $expected); } - +/** + * testTablePrefixSwitching method + * + * @access public + * @return void + */ function testTablePrefixSwitching() { ConnectionManager::create('database1', array_merge($this->db->config, array('prefix' => 'aaa_'))); ConnectionManager::create('database2', array_merge($this->db->config, array('prefix' => 'bbb_'))); @@ -4331,7 +4336,12 @@ class ModelTest extends CakeTestCase { $this->assertEqual($this->db->fullTableName($TestModel, false), 'custom_apples'); $this->assertEqual($db1->fullTableName($TestModel, false), 'custom_apples'); } - +/** + * testDynamicBehaviorAttachment method + * + * @access public + * @return void + */ function testDynamicBehaviorAttachment() { $this->loadFixtures('Apple'); $TestModel =& new Apple(); @@ -4467,7 +4477,12 @@ class ModelTest extends CakeTestCase { $this->_fixtures[$this->_fixtureClassMap[$class]]->drop($db2); } } - +/** + * testDisplayField method + * + * @access public + * @return void + */ function testDisplayField() { $this->loadFixtures('Post', 'Comment', 'Person'); $Post = new Post(); @@ -4478,7 +4493,12 @@ class ModelTest extends CakeTestCase { $this->assertEqual($Person->displayField, 'name'); $this->assertEqual($Comment->displayField, 'id'); } - +/** + * testSchema method + * + * @access public + * @return void + */ function testSchema() { $Post = new Post(); @@ -4500,7 +4520,12 @@ class ModelTest extends CakeTestCase { $this->assertEqual($Post->getColumnTypes(), array_combine($columns, $types)); } - +/** + * testOldQuery method + * + * @access public + * @return void + */ function testOldQuery() { $this->loadFixtures('Article'); $Article =& new Article(); @@ -4520,7 +4545,12 @@ class ModelTest extends CakeTestCase { $this->assertTrue(isset($this->db->_queryCache[$query])); $this->assertTrue(is_array($results)); } - +/** + * testPreparedQuery method + * + * @access public + * @return void + */ function testPreparedQuery() { $this->loadFixtures('Article'); $Article =& new Article(); @@ -4557,7 +4587,12 @@ class ModelTest extends CakeTestCase { isset($result[0][0]['title']) ); } - +/** + * testParameterMismatch method + * + * @access public + * @return void + */ function testParameterMismatch() { $this->loadFixtures('Article'); $Article =& new Article(); @@ -4570,7 +4605,12 @@ class ModelTest extends CakeTestCase { ob_end_clean(); $this->assertEqual($result, null); } - +/** + * testVeryStrangeUseCase method + * + * @access public + * @return void + */ function testVeryStrangeUseCase() { if ($this->db->config['driver'] == 'mssql') { return; @@ -4586,7 +4626,12 @@ class ModelTest extends CakeTestCase { $result = $Article->query($query, $param); ob_end_clean(); } - +/** + * testUnderscoreFieldSave method + * + * @access public + * @return void + */ function testUnderscoreFieldSave() { $this->loadFixtures('UnderscoreField'); $UnderscoreField =& new UnderscoreField(); @@ -4606,7 +4651,12 @@ class ModelTest extends CakeTestCase { $currentCount = $UnderscoreField->find('count'); $this->assertEqual($currentCount, 4); } - +/** + * testGroupBy method + * + * @access public + * @return void + */ function testGroupBy() { $this->loadFixtures('Project', 'Product', 'Thread', 'Message', 'Bid'); $Thread =& new Thread(); @@ -4673,7 +4723,12 @@ class ModelTest extends CakeTestCase { ); $this->assertEqual($result, $expected); } - + /** + * testSaveDateAsFirstEntry method + * + * @access public + * @return void + */ function testSaveDateAsFirstEntry() { $this->loadFixtures('Article'); @@ -4694,7 +4749,12 @@ class ModelTest extends CakeTestCase { $this->assertEqual($testResult['Article']['created'], '2008-01-01 00:00:00'); } - +/** + * endTest method + * + * @access public + * @return void + */ function endTest() { ClassRegistry::flush(); } diff --git a/cake/tests/cases/libs/model/models.php b/cake/tests/cases/libs/model/models.php index 0b12ecf9b..63de48efb 100644 --- a/cake/tests/cases/libs/model/models.php +++ b/cake/tests/cases/libs/model/models.php @@ -74,7 +74,19 @@ class Test extends Model { * @subpackage cake.tests.cases.libs.model */ class TestAlias extends Model { +/** + * useTable property + * + * @var bool false + * @access public + */ var $useTable = false; +/** + * name property + * + * @var string 'TestAlias' + * @access public + */ var $name = 'TestAlias'; /** * alias property @@ -695,8 +707,20 @@ class Author extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class ModifiedAuthor extends Author { +/** + * name property + * + * @var string 'Author' + * @access public + */ var $name = 'Author'; - +/** + * afterFind method + * + * @param mixed $results + * @access public + * @return void + */ function afterFind($results) { foreach($results as $index => $result) { $results[$index]['Author']['user'] .= ' (CakePHP)'; @@ -711,7 +735,19 @@ class ModifiedAuthor extends Author { * @subpackage cake.tests.cases.libs.model */ class Project extends CakeTestModel { +/** + * name property + * + * @var string 'Project' + * @access public + */ var $name = 'Project'; +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('Thread'); } /** @@ -721,7 +757,19 @@ class Project extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Thread extends CakeTestModel { +/** + * name property + * + * @var string 'Thread' + * @access public + */ var $name = 'Thread'; +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('Message'); } /** @@ -731,7 +779,19 @@ class Thread extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Message extends CakeTestModel { +/** + * name property + * + * @var string 'Message' + * @access public + */ var $name = 'Message'; +/** + * hasOne property + * + * @var array + * @access public + */ var $hasOne = array('Bid'); } /** @@ -741,36 +801,180 @@ class Message extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Bid extends CakeTestModel { +/** + * name property + * + * @var string 'Bid' + * @access public + */ var $name = 'Bid'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Message'); } +/** + * NodeAfterFind class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class NodeAfterFind extends CakeTestModel { +/** + * name property + * + * @var string 'NodeAfterFind' + * @access public + */ var $name = 'NodeAfterFind'; +/** + * validate property + * + * @var array + * @access public + */ var $validate = array('name' => VALID_NOT_EMPTY); +/** + * useTable property + * + * @var string 'apples' + * @access public + */ var $useTable = 'apples'; +/** + * hasOne property + * + * @var array + * @access public + */ var $hasOne = array('Sample' => array('className' => 'NodeAfterFindSample')); +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('Child' => array('className' => 'NodeAfterFind', 'dependent' => true)); +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Parent' => array('className' => 'NodeAfterFind', 'foreignKey' => 'apple_id')); - +/** + * afterFind method + * + * @param mixed $results + * @access public + * @return void + */ function afterFind($results) { return $results; } } +/** + * NodeAfterFindSample class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class NodeAfterFindSample extends CakeTestModel { +/** + * name property + * + * @var string 'NodeAfterFindSample' + * @access public + */ var $name = 'NodeAfterFindSample'; +/** + * useTable property + * + * @var string 'samples' + * @access public + */ var $useTable = 'samples'; +/** + * belongsTo property + * + * @var string 'NodeAfterFind' + * @access public + */ var $belongsTo = 'NodeAfterFind'; } +/** + * NodeNoAfterFind class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class NodeNoAfterFind extends CakeTestModel { +/** + * name property + * + * @var string 'NodeAfterFind' + * @access public + */ var $name = 'NodeAfterFind'; +/** + * validate property + * + * @var array + * @access public + */ var $validate = array('name' => VALID_NOT_EMPTY); +/** + * useTable property + * + * @var string 'apples' + * @access public + */ var $useTable = 'apples'; +/** + * hasOne property + * + * @var array + * @access public + */ var $hasOne = array('Sample' => array('className' => 'NodeAfterFindSample')); +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('Child' => array('className' => 'NodeAfterFind', 'dependent' => true)); +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Parent' => array('className' => 'NodeAfterFind', 'foreignKey' => 'apple_id')); } +/** + * Node class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Node extends CakeTestModel{ +/** + * name property + * + * @var string 'Node' + * @access public + */ var $name = 'Node'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array( 'ParentNode' => array( 'className' => 'Node', @@ -780,115 +984,595 @@ class Node extends CakeTestModel{ ) ); } +/** + * Dependency class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Dependency extends CakeTestModel{ +/** + * name property + * + * @var string 'Dependency' + * @access public + */ var $name = 'Dependency'; } +/** + * ModelA class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ModelA extends CakeTestModel { +/** + * name property + * + * @var string 'ModelA' + * @access public + */ var $name = 'ModelA'; +/** + * useTable property + * + * @var string 'apples' + * @access public + */ var $useTable = 'apples'; +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('ModelB', 'ModelC'); } +/** + * ModelB class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ModelB extends CakeTestModel { +/** + * name property + * + * @var string 'ModelB' + * @access public + */ var $name = 'ModelB'; +/** + * useTable property + * + * @var string 'messages' + * @access public + */ var $useTable = 'messages'; +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('ModelD'); } +/** + * ModelC class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ModelC extends CakeTestModel { +/** + * name property + * + * @var string 'ModelC' + * @access public + */ var $name = 'ModelC'; +/** + * useTable property + * + * @var string 'bids' + * @access public + */ var $useTable = 'bids'; +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('ModelD'); } +/** + * ModelD class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ModelD extends CakeTestModel { +/** + * name property + * + * @var string 'ModelD' + * @access public + */ var $name = 'ModelD'; +/** + * useTable property + * + * @var string 'threads' + * @access public + */ var $useTable = 'threads'; } +/** + * Something class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Something extends CakeTestModel { +/** + * name property + * + * @var string 'Something' + * @access public + */ var $name = 'Something'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('SomethingElse' => array('with' => array('JoinThing' => array('doomed')))); } +/** + * SomethingElse class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class SomethingElse extends CakeTestModel { +/** + * name property + * + * @var string 'SomethingElse' + * @access public + */ var $name = 'SomethingElse'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('Something' => array('with' => 'JoinThing')); } +/** + * JoinThing class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class JoinThing extends CakeTestModel { +/** + * name property + * + * @var string 'JoinThing' + * @access public + */ var $name = 'JoinThing'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Something', 'SomethingElse'); } +/** + * Portfolio class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Portfolio extends CakeTestModel { +/** + * name property + * + * @var string 'Portfolio' + * @access public + */ var $name = 'Portfolio'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('Item'); } +/** + * Item class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Item extends CakeTestModel { +/** + * name property + * + * @var string 'Item' + * @access public + */ var $name = 'Item'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Syfile' => array('counterCache' => true)); +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('Portfolio' => array('unique' => false)); } +/** + * ItemsPortfolio class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ItemsPortfolio extends CakeTestModel { +/** + * name property + * + * @var string 'ItemsPortfolio' + * @access public + */ var $name = 'ItemsPortfolio'; } +/** + * Syfile class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Syfile extends CakeTestModel { +/** + * name property + * + * @var string 'Syfile' + * @access public + */ var $name = 'Syfile'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Image'); } +/** + * Image class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Image extends CakeTestModel { +/** + * name property + * + * @var string 'Image' + * @access public + */ var $name = 'Image'; } +/** + * DeviceType class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class DeviceType extends CakeTestModel { +/** + * name property + * + * @var string 'DeviceType' + * @access public + */ var $name = 'DeviceType'; +/** + * order property + * + * @var array + * @access public + */ var $order = array('DeviceType.order' => 'ASC'); +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array( 'DeviceTypeCategory', 'FeatureSet', 'ExteriorTypeCategory', 'Image' => array('className' => 'Document'), 'Extra1' => array('className' => 'Document'), 'Extra2' => array('className' => 'Document')); +/** + * hasMany property + * + * @var array + * @access public + */ var $hasMany = array('Device' => array('order' => array('Device.id' => 'ASC'))); } +/** + * DeviceTypeCategory class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class DeviceTypeCategory extends CakeTestModel { +/** + * name property + * + * @var string 'DeviceTypeCategory' + * @access public + */ var $name = 'DeviceTypeCategory'; } +/** + * FeatureSet class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class FeatureSet extends CakeTestModel { +/** + * name property + * + * @var string 'FeatureSet' + * @access public + */ var $name = 'FeatureSet'; } +/** + * ExteriorTypeCategory class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ExteriorTypeCategory extends CakeTestModel { +/** + * name property + * + * @var string 'ExteriorTypeCategory' + * @access public + */ var $name = 'ExteriorTypeCategory'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('Image' => array('className' => 'Device')); } +/** + * Document class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Document extends CakeTestModel { +/** + * name property + * + * @var string 'Document' + * @access public + */ var $name = 'Document'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array('DocumentDirectory'); } +/** + * Device class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Device extends CakeTestModel { +/** + * name property + * + * @var string 'Device' + * @access public + */ var $name = 'Device'; } +/** + * DocumentDirectory class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class DocumentDirectory extends CakeTestModel { +/** + * name property + * + * @var string 'DocumentDirectory' + * @access public + */ var $name = 'DocumentDirectory'; } +/** + * PrimaryModel class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class PrimaryModel extends CakeTestModel { +/** + * name property + * + * @var string 'PrimaryModel' + * @access public + */ var $name = 'PrimaryModel'; } +/** + * SecondaryModel class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class SecondaryModel extends CakeTestModel { +/** + * name property + * + * @var string 'SecondaryModel' + * @access public + */ var $name = 'SecondaryModel'; } +/** + * JoinA class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class JoinA extends CakeTestModel { +/** + * name property + * + * @var string 'JoinA' + * @access public + */ var $name = 'JoinA'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('JoinB', 'JoinC'); } +/** + * JoinB class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class JoinB extends CakeTestModel { +/** + * name property + * + * @var string 'JoinB' + * @access public + */ var $name = 'JoinB'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('JoinA'); } +/** + * JoinC class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class JoinC extends CakeTestModel { +/** + * name property + * + * @var string 'JoinC' + * @access public + */ var $name = 'JoinC'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('JoinA'); } +/** + * ThePaper class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class ThePaper extends CakeTestModel { +/** + * name property + * + * @var string 'ThePaper' + * @access public + */ var $name = 'ThePaper'; +/** + * useTable property + * + * @var string 'apples' + * @access public + */ var $useTable = 'apples'; +/** + * hasOne property + * + * @var array + * @access public + */ var $hasOne = array('Itself' => array('className' => 'ThePaper', 'foreignKey' => 'apple_id')); +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('Monkey' => array('joinTable' => 'the_paper_monkies')); } +/** + * Monkey class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class Monkey extends CakeTestModel { +/** + * name property + * + * @var string 'Monkey' + * @access public + */ var $name = 'Monkey'; +/** + * useTable property + * + * @var string 'devices' + * @access public + */ var $useTable = 'devices'; } /** @@ -898,9 +1582,26 @@ class Monkey extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class AssociationTest1 extends CakeTestModel { +/** + * useTable property + * + * @var string 'join_as' + * @access public + */ var $useTable = 'join_as'; +/** + * name property + * + * @var string 'AssociationTest1' + * @access public + */ var $name = 'AssociationTest1'; - +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('AssociationTest2' => array( 'unique' => false, 'joinTable' => 'join_as_join_bs', 'foreignKey' => false )); @@ -912,9 +1613,26 @@ class AssociationTest1 extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class AssociationTest2 extends CakeTestModel { +/** + * useTable property + * + * @var string 'join_bs' + * @access public + */ var $useTable = 'join_bs'; +/** + * name property + * + * @var string 'AssociationTest2' + * @access public + */ var $name = 'AssociationTest2'; - +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('AssociationTest1' => array( 'unique' => false, 'joinTable' => 'join_as_join_bs' )); @@ -935,6 +1653,12 @@ class Callback extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Uuid extends CakeTestModel { +/** + * name property + * + * @var string 'Uuid' + * @access public + */ var $name = 'Uuid'; } /** @@ -944,6 +1668,12 @@ class Uuid extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class DataTest extends CakeTestModel { +/** + * name property + * + * @var string 'DataTest' + * @access public + */ var $name = 'DataTest'; } /** @@ -953,7 +1683,19 @@ class DataTest extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class TheVoid extends CakeTestModel { +/** + * name property + * + * @var string 'TheVoid' + * @access public + */ var $name = 'TheVoid'; +/** + * useTable property + * + * @var bool false + * @access public + */ var $useTable = false; } /** @@ -963,10 +1705,33 @@ class TheVoid extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class ValidationTest extends CakeTestModel { +/** + * name property + * + * @var string 'ValidationTest' + * @access public + */ var $name = 'ValidationTest'; +/** + * useTable property + * + * @var bool false + * @access public + */ var $useTable = false; +/** + * schema property + * + * @var array + * @access protected + */ var $_schema = array(); - +/** + * validate property + * + * @var array + * @access public + */ var $validate = array( 'title' => VALID_NOT_EMPTY, 'published' => 'customValidationMethod', @@ -976,7 +1741,13 @@ class ValidationTest extends CakeTestModel { '/^[0-9A-Za-z \\.]{1,}$/s' ) ); - +/** + * customValidationMethod method + * + * @param mixed $data + * @access public + * @return void + */ function customValidationMethod($data) { return $data === 1; } @@ -989,9 +1760,26 @@ class ValidationTest extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class ValidationTest2 extends CakeTestModel { +/** + * name property + * + * @var string 'ValidationTest2' + * @access public + */ var $name = 'ValidationTest2'; +/** + * useTable property + * + * @var bool false + * @access public + */ var $useTable = false; - +/** + * validate property + * + * @var array + * @access public + */ var $validate = array( 'title' => VALID_NOT_EMPTY, 'published' => 'customValidationMethod', @@ -1001,11 +1789,22 @@ class ValidationTest2 extends CakeTestModel { '/^[0-9A-Za-z \\.]{1,}$/s' ) ); - +/** + * customValidationMethod method + * + * @param mixed $data + * @access public + * @return void + */ function customValidationMethod($data) { return $data === 1; } - +/** + * schema method + * + * @access public + * @return void + */ function schema() { return array(); } @@ -1017,7 +1816,19 @@ class ValidationTest2 extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Person extends CakeTestModel { +/** + * name property + * + * @var string 'Person' + * @access public + */ var $name = 'Person'; +/** + * belongsTo property + * + * @var array + * @access public + */ var $belongsTo = array( 'Mother' => array( 'className' => 'Person', @@ -1033,6 +1844,12 @@ class Person extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class UnderscoreField extends CakeTestModel { +/** + * name property + * + * @var string 'UnderscoreField' + * @access public + */ var $name = 'UnderscoreField'; } /** @@ -1042,6 +1859,12 @@ class UnderscoreField extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Product extends CakeTestModel { +/** + * name property + * + * @var string 'Product' + * @access public + */ var $name = 'Product'; } /** @@ -1051,9 +1874,33 @@ class Product extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Story extends CakeTestModel { +/** + * name property + * + * @var string 'Story' + * @access public + */ var $name = 'Story'; +/** + * primaryKey property + * + * @var string 'story' + * @access public + */ var $primaryKey = 'story'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('Tag' => array('foreignKey' => 'story')); +/** + * validate property + * + * @var array + * @access public + */ var $validate = array('title' => VALID_NOT_EMPTY); } ?> diff --git a/cake/tests/cases/libs/model/schema.test.php b/cake/tests/cases/libs/model/schema.test.php index 1ac960849..3b83b40a1 100644 --- a/cake/tests/cases/libs/model/schema.test.php +++ b/cake/tests/cases/libs/model/schema.test.php @@ -274,8 +274,26 @@ class SchemaComment extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class SchemaTag extends CakeTestModel { +/** + * name property + * + * @var string 'SchemaTag' + * @access public + */ var $name = 'SchemaTag'; +/** + * useTable property + * + * @var string 'tags' + * @access public + */ var $useTable = 'tags'; +/** + * hasAndBelongsToMany property + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array('SchemaPost'); } /** @@ -285,11 +303,41 @@ class SchemaTag extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class SchemaDatatype extends CakeTestModel { +/** + * name property + * + * @var string 'SchemaDatatype' + * @access public + */ var $name = 'SchemaDatatype'; +/** + * useTable property + * + * @var string 'datatypes' + * @access public + */ var $useTable = 'datatypes'; } +/** + * PostsTag class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ class PostsTag extends CakeTestModel { +/** + * name property + * + * @var string 'PostsTag' + * @access public + */ var $name = 'PostsTag'; +/** + * useTable property + * + * @var string 'posts_tags' + * @access public + */ var $useTable = 'posts_tags'; } /** @@ -299,13 +347,28 @@ class PostsTag extends CakeTestModel { * @subpackage cake.tests.cases.libs */ class CakeSchemaTest extends CakeTestCase { - +/** + * fixtures property + * + * @var array + * @access public + */ var $fixtures = array('core.post', 'core.tag', 'core.posts_tag', 'core.comment', 'core.datatype'); - +/** + * setUp method + * + * @access public + * @return void + */ function setUp() { $this->Schema = new TestAppSchema(); } - +/** + * testSchemaName method + * + * @access public + * @return void + */ function testSchemaName() { $Schema = new CakeSchema(); $this->assertEqual(strtolower($Schema->name), strtolower(APP_DIR)); @@ -316,14 +379,24 @@ class CakeSchemaTest extends CakeTestCase { Configure::write('App.dir', 'app'); } - +/** + * testSchemaRead method + * + * @access public + * @return void + */ function testSchemaRead() { $read = $this->Schema->read(array('connection'=>'test_suite', 'name'=>'TestApp', 'models' => array('SchemaPost', 'SchemaComment', 'SchemaTag', 'SchemaDatatype'))); unset($read['tables']['missing']); $this->assertEqual($read['tables'], $this->Schema->tables); $this->assertIdentical($read['tables']['datatypes']['float_field'], $this->Schema->tables['datatypes']['float_field']); } - +/** + * testSchemaWrite method + * + * @access public + * @return void + */ function testSchemaWrite() { $write = $this->Schema->write(array('name'=>'MyOtherApp', 'tables'=> $this->Schema->tables, 'path'=> TMP . 'tests')); @@ -335,7 +408,12 @@ class CakeSchemaTest extends CakeTestCase { $this->assertEqual($this->Schema->tables, $OtherSchema->tables); } - +/** + * testSchemaComparison method + * + * @access public + * @return void + */ function testSchemaComparison() { $New = new MyAppSchema(); $compare = $New->compare($this->Schema); @@ -359,13 +437,23 @@ class CakeSchemaTest extends CakeTestCase { $this->assertEqual($expected, $compare); } - +/** + * testSchemaLoading method + * + * @access public + * @return void + */ function testSchemaLoading() { $Other = $this->Schema->load(array('name'=>'MyOtherApp', 'path'=> TMP . 'tests')); $this->assertEqual($Other->name, 'MyOtherApp'); $this->assertEqual($Other->tables, $this->Schema->tables); } - +/** + * testSchemaCreateTable method + * + * @access public + * @return void + */ function testSchemaCreateTable() { $db =& ConnectionManager::getDataSource('test_suite'); $db->query('CREATE TABLE ' . $db->fullTableName('testdescribes') . ' (id int(11) AUTO_INCREMENT, int_null int(10) unsigned NULL, int_not_null int(10) unsigned NOT NULL, primary key(id));'); @@ -382,7 +470,12 @@ class CakeSchemaTest extends CakeTestCase { $db->query('DROP TABLE ' . $this->db->fullTableName('testdescribes')); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Schema); } diff --git a/cake/tests/cases/libs/object.test.php b/cake/tests/cases/libs/object.test.php index e093f0a5e..f61d8003a 100644 --- a/cake/tests/cases/libs/object.test.php +++ b/cake/tests/cases/libs/object.test.php @@ -284,7 +284,12 @@ class ObjectTest extends UnitTestCase { $result = strtolower($this->object->toString()); $this->assertEqual($result, 'testobject'); } - +/** + * testMethodDispatching method + * + * @access public + * @return void + */ function testMethodDispatching() { $this->object->emptyMethod(); $expected = array('emptyMethod'); @@ -345,7 +350,12 @@ class ObjectTest extends UnitTestCase { $expected[] = array('methodWithOptionalParam' => array(null)); $this->assertIdentical($this->object->methodCalls, $expected); } - +/** + * testRequestAction method + * + * @access public + * @return void + */ function testRequestAction(){ $result = $this->object->requestAction(''); $this->assertFalse($result); @@ -406,7 +416,12 @@ class ObjectTest extends UnitTestCase { $expected = 25; $this->assertEqual($result, $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->object); } diff --git a/cake/tests/cases/libs/router.test.php b/cake/tests/cases/libs/router.test.php index 01a65dbd3..466179d52 100644 --- a/cake/tests/cases/libs/router.test.php +++ b/cake/tests/cases/libs/router.test.php @@ -41,7 +41,7 @@ if (!defined('FULL_BASE_URL')) { class RouterTest extends UnitTestCase { /** * setUp method - * + * * @access public * @return void */ @@ -51,7 +51,7 @@ class RouterTest extends UnitTestCase { } /** * testReturnedInstanceReference method - * + * * @access public * @return void */ @@ -62,7 +62,7 @@ class RouterTest extends UnitTestCase { } /** * testFullBaseURL method - * + * * @access public * @return void */ @@ -72,7 +72,7 @@ class RouterTest extends UnitTestCase { } /** * testRouteWriting method - * + * * @access public * @return void */ @@ -132,7 +132,7 @@ class RouterTest extends UnitTestCase { } /** * testRouteDefaultParams method - * + * * @access public * @return void */ @@ -142,7 +142,7 @@ class RouterTest extends UnitTestCase { } /** * testRouterIdentity method - * + * * @access public * @return void */ @@ -152,7 +152,7 @@ class RouterTest extends UnitTestCase { } /** * testResourceRoutes method - * + * * @access public * @return void */ @@ -208,7 +208,7 @@ class RouterTest extends UnitTestCase { } /** * testMultipleResourceRoute method - * + * * @access public * @return void */ @@ -225,7 +225,7 @@ class RouterTest extends UnitTestCase { } /** * testUrlNormalization method - * + * * @access public * @return void */ @@ -249,7 +249,7 @@ class RouterTest extends UnitTestCase { } /** * testUrlGeneration method - * + * * @access public * @return void */ @@ -596,7 +596,7 @@ class RouterTest extends UnitTestCase { } /** * testUrlGenerationWithPrefix method - * + * * @access public * @return void */ @@ -623,7 +623,7 @@ class RouterTest extends UnitTestCase { } /** * testUrlGenerationWithExtensions method - * + * * @access public * @return void */ @@ -647,7 +647,7 @@ class RouterTest extends UnitTestCase { } /** * testPluginUrlGeneration method - * + * * @access public * @return void */ @@ -668,7 +668,7 @@ class RouterTest extends UnitTestCase { } /** * testUrlParsing method - * + * * @access public * @return void */ @@ -811,7 +811,7 @@ class RouterTest extends UnitTestCase { } /** * testUuidRoutes method - * + * * @access public * @return void */ @@ -827,7 +827,7 @@ class RouterTest extends UnitTestCase { } /** * testRouteSymmetry method - * + * * @access public * @return void */ @@ -865,7 +865,7 @@ class RouterTest extends UnitTestCase { } /** * testAdminRouting method - * + * * @access public * @return void */ @@ -930,7 +930,7 @@ class RouterTest extends UnitTestCase { } /** * testExtensionParsingSetting method - * + * * @access public * @return void */ @@ -943,7 +943,7 @@ class RouterTest extends UnitTestCase { } /** * testExtensionParsing method - * + * * @access public * @return void */ @@ -984,7 +984,7 @@ class RouterTest extends UnitTestCase { } /** * testQuerystringGeneration method - * + * * @access public * @return void */ @@ -1000,7 +1000,7 @@ class RouterTest extends UnitTestCase { $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => array('var' => 'test', 'var2' => 'test2', 'more' => 'test data'))); $this->assertEqual($result, $expected); - // Test bug #4614 +// Test bug #4614 $restore = ini_get('arg_separator.output'); ini_set('arg_separator.output', '&'); $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => array('var' => 'test', 'var2' => 'test2', 'more' => 'test data'))); @@ -1009,7 +1009,7 @@ class RouterTest extends UnitTestCase { } /** * testConnectNamed method - * + * * @access public * @return void */ @@ -1020,7 +1020,7 @@ class RouterTest extends UnitTestCase { } /** * testNamedArgsUrlGeneration method - * + * * @access public * @return void */ @@ -1073,7 +1073,7 @@ class RouterTest extends UnitTestCase { } /** * testNamedArgsUrlParsing method - * + * * @access public * @return void */ @@ -1139,7 +1139,7 @@ class RouterTest extends UnitTestCase { } /** * testUrlGenerationWithPrefixes method - * + * * @access public * @return void */ @@ -1168,7 +1168,7 @@ class RouterTest extends UnitTestCase { } /** * testRemoveBase method - * + * * @access public * @return void */ @@ -1192,7 +1192,7 @@ class RouterTest extends UnitTestCase { } /** * testParamsUrlParsing method - * + * * @access public * @return void */ @@ -1220,7 +1220,7 @@ class RouterTest extends UnitTestCase { } /** * testPagesUrlParsing method - * + * * @access public * @return void */ @@ -1279,7 +1279,12 @@ class RouterTest extends UnitTestCase { $expected = array('pass'=>array('contact'), 'named' => array(), 'plugin'=> null, 'controller'=>'pages', 'action'=>'display'); $this->assertEqual($result, $expected); } - +/** + * testParsingWithPrefixes method + * + * @access public + * @return void + */ function testParsingWithPrefixes() { $adminParams = array('prefix' => 'admin', 'admin' => true); Router::connect('/admin/:controller', $adminParams); @@ -1306,7 +1311,12 @@ class RouterTest extends UnitTestCase { $expected = array('admin'); $this->assertEqual($result, $expected); } - +/** + * testPassedArgsOrder method + * + * @access public + * @return void + */ function testPassedArgsOrder() { Router::connect('/test2/*', array('controller' => 'pages', 'action' => 'display', 2)); Router::connect('/test/*', array('controller' => 'pages', 'action' => 'display', 1)); @@ -1342,7 +1352,12 @@ class RouterTest extends UnitTestCase { $expected = array('protected', 'admin'); $this->assertEqual($result, $expected); } - +/** + * testRegexRouteMatching method + * + * @access public + * @return void + */ function testRegexRouteMatching() { Router::connect('/:locale/:controller/:action/*', array(), array('locale' => 'dan|eng')); diff --git a/cake/tests/cases/libs/sanitize.test.php b/cake/tests/cases/libs/sanitize.test.php index 9c4d19ffa..66a123876 100644 --- a/cake/tests/cases/libs/sanitize.test.php +++ b/cake/tests/cases/libs/sanitize.test.php @@ -347,7 +347,12 @@ class SanitizeTest extends CakeTestCase { $this->assertEqual($result, $expected); } - + /** + * testStripTags method + * + * @access public + * @return void + */ function testStripTags() { $string = '

Headline

My Link could go to a bad site

'; $expected = 'Headline

My Link could go to a bad site

'; @@ -364,7 +369,12 @@ class SanitizeTest extends CakeTestCase { $result = Sanitize::stripTags($string, 'h2', 'a'); $this->assertEqual($result, $expected); } - + /** + * testFormatColumns method + * + * @access public + * @return void + */ function testFormatColumns() { $this->loadFixtures('DataTest', 'Article'); diff --git a/cake/tests/cases/libs/security.test.php b/cake/tests/cases/libs/security.test.php index 244d34f10..05a7798e0 100644 --- a/cake/tests/cases/libs/security.test.php +++ b/cake/tests/cases/libs/security.test.php @@ -36,23 +36,23 @@ App::import('Core', 'Security'); class SecurityTest extends UnitTestCase { /** * sut property - * + * * @var mixed null * @access public */ var $sut = null; - /** +/** * setUp method - * + * * @access public * @return void */ function setUp() { $this->sut =& Security::getInstance(); } - /** +/** * testInactiveMins method - * + * * @access public * @return void */ @@ -66,18 +66,18 @@ class SecurityTest extends UnitTestCase { Configure::write('Security.level', 'low'); $this->assertEqual(300, Security::inactiveMins()); } - /** +/** * testGenerateAuthkey method - * + * * @access public * @return void */ function testGenerateAuthkey() { $this->assertEqual(strlen(Security::generateAuthKey()), 40); } - /** +/** * testValidateAuthKey method - * + * * @access public * @return void */ @@ -87,7 +87,7 @@ class SecurityTest extends UnitTestCase { } /** * testHash method - * + * * @access public * @return void */ @@ -122,11 +122,16 @@ class SecurityTest extends UnitTestCase { $this->assertIdentical(strlen(Security::hash($key, 'sha256', true)), 32); } } - +/** + * testCipher method + * + * @access public + * @return void + */ function testCipher() { $length = 10; $txt = ''; - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; $i++) { $txt .= rand(0, 255); } $key = 'my_key'; diff --git a/cake/tests/cases/libs/session.test.php b/cake/tests/cases/libs/session.test.php index 7a510f74f..5d0107b48 100644 --- a/cake/tests/cases/libs/session.test.php +++ b/cake/tests/cases/libs/session.test.php @@ -34,10 +34,10 @@ App::import('Core', 'Session'); * @subpackage cake.tests.cases.libs */ class SessionTest extends CakeTestCase { - var $fixtures = array('core.session'); //using fixtures really messes things up. but should eventually be used. - /** + var $fixtures = array('core.session');//using fixtures really messes things up. but should eventually be used. +/** * setUp method - * + * * @access public * @return void */ @@ -52,7 +52,7 @@ class SessionTest extends CakeTestCase { } /** * testCheck method - * + * * @access public * @return void */ @@ -62,9 +62,9 @@ class SessionTest extends CakeTestCase { $this->assertFalse($this->Session->check('NotExistingSessionTestCase'), false); } - /** +/** * testSimpleRead method - * + * * @access public * @return void */ @@ -72,22 +72,22 @@ class SessionTest extends CakeTestCase { $this->Session->write('testing', '1,2,3'); $result = $this->Session->read('testing'); $this->assertEqual($result, '1,2,3'); - + $this->Session->write('testing', array('1' => 'one', '2' => 'two','3' => 'three')); $result = $this->Session->read('testing.1'); $this->assertEqual($result, 'one'); - + $result = $this->Session->read('testing'); $this->assertEqual($result, array('1' => 'one', '2' => 'two', '3' => 'three')); - + $result = $this->Session->read(); $this->assertTrue(isset($result['testing'])); $this->assertTrue(isset($result['Config'])); $this->assertTrue(isset($result['Config']['userAgent'])); } - /** +/** * testId method - * + * * @access public * @return void */ @@ -95,27 +95,27 @@ class SessionTest extends CakeTestCase { $expected = session_id(); $result = $this->Session->id(); $this->assertEqual($result, $expected); - + $this->Session->id('MySessionId'); $result = $this->Session->id(); $this->assertEqual($result, 'MySessionId'); } - /** +/** * testStarted method - * + * * @access public * @return void */ function testStarted() { $this->assertTrue($this->Session->started()); - + unset($_SESSION); - $this->assertFalse($this->Session->started()); + $this->assertFalse($this->Session->started()); $this->assertTrue($this->Session->start()); } - /** +/** * testError method - * + * * @access public * @return void */ @@ -123,14 +123,14 @@ class SessionTest extends CakeTestCase { $this->Session->read('Does.not.exist'); $result = $this->Session->error(); $this->assertEqual($result, "Does.not.exist doesn't exist"); - + $this->Session->del('Failing.delete'); $result = $this->Session->error(); $this->assertEqual($result, "Failing.delete doesn't exist"); } - /** +/** * testDel method - * + * * @access public * @return void */ @@ -139,34 +139,34 @@ class SessionTest extends CakeTestCase { $this->assertTrue($this->Session->del('Delete.me')); $this->assertFalse($this->Session->check('Delete.me')); $this->assertTrue($this->Session->check('Delete')); - + $this->assertTrue($this->Session->write('Clearing.sale', 'everything must go')); $this->assertTrue($this->Session->del('Clearing')); $this->assertFalse($this->Session->check('Clearing.sale')); $this->assertFalse($this->Session->check('Clearing')); } - /** +/** * testWatchVar method - * + * * @access public * @return void */ function testWatchVar() { $this->assertFalse($this->Session->watch(null)); - + $this->Session->write('Watching', "I'm watching you"); $this->Session->watch('Watching'); $this->expectError('Writing session key {Watching}: "They found us!"'); - $this->Session->write('Watching', 'They found us!'); - + $this->Session->write('Watching', 'They found us!'); + $this->expectError('Deleting session key {Watching}'); $this->Session->del('Watching'); - - $this->assertFalse($this->Session->watch('Invalid.key')); + + $this->assertFalse($this->Session->watch('Invalid.key')); } - /** +/** * testIgnore method - * + * * @access public * @return void */ @@ -176,9 +176,9 @@ class SessionTest extends CakeTestCase { $this->Session->ignore('Watching'); $this->assertTrue($this->Session->write('Watching', 'They found us!')); } - /** +/** * testDestroy method - * + * * @access public * @return void */ @@ -189,9 +189,9 @@ class SessionTest extends CakeTestCase { $this->assertFalse($this->Session->check('bulletProof')); $this->assertNotEqual($id, $this->Session->id()); } - /** +/** * testCheckingSavedEmpty method - * + * * @access public * @return void */ @@ -210,7 +210,7 @@ class SessionTest extends CakeTestCase { } /** * testCheckKeyWithSpaces method - * + * * @access public * @return void */ @@ -224,7 +224,7 @@ class SessionTest extends CakeTestCase { } /** * testReadingSavedEmpty method - * + * * @access public * @return void */ @@ -244,7 +244,7 @@ class SessionTest extends CakeTestCase { } /** * testCheckUserAgentFalse method - * + * * @access public * @return void */ @@ -255,7 +255,7 @@ class SessionTest extends CakeTestCase { } /** * testCheckUserAgentTrue method - * + * * @access public * @return void */ @@ -266,7 +266,7 @@ class SessionTest extends CakeTestCase { } /** * testReadAndWriteWithDatabaseStorage method - * + * * @access public * @return void */ @@ -292,7 +292,12 @@ class SessionTest extends CakeTestCase { $this->Session->write('SessionTestCase', 'This is a Test'); $this->assertEqual($this->Session->read('SessionTestCase'), 'This is a Test'); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { $this->Session->del('SessionTestCase'); unset($this->Session); diff --git a/cake/tests/cases/libs/set.test.php b/cake/tests/cases/libs/set.test.php index e4df0f556..2ff30ce55 100644 --- a/cake/tests/cases/libs/set.test.php +++ b/cake/tests/cases/libs/set.test.php @@ -37,7 +37,7 @@ App::import('Core', 'Set'); class SetTest extends UnitTestCase { /** * testNumericKeyExtraction method - * + * * @access public * @return void */ @@ -48,7 +48,7 @@ class SetTest extends UnitTestCase { } /** * testEnum method - * + * * @access public * @return void */ @@ -57,17 +57,17 @@ class SetTest extends UnitTestCase { $this->assertIdentical($result, 'two'); $result = Set::enum(2, 'one, two'); $this->assertNull($result); - + $result = Set::enum(1, array('one', 'two')); $this->assertIdentical($result, 'two'); $result = Set::enum(2, array('one', 'two')); $this->assertNull($result); - + $result = Set::enum('first', array('first' => 'one', 'second' => 'two')); $this->assertIdentical($result, 'one'); $result = Set::enum('third', array('first' => 'one', 'second' => 'two')); $this->assertNull($result); - + $result = Set::enum('no', array('no' => 0, 'yes' => 1)); $this->assertIdentical($result, 0); $result = Set::enum('not sure', array('no' => 0, 'yes' => 1)); @@ -75,7 +75,7 @@ class SetTest extends UnitTestCase { } /** * testFilter method - * + * * @access public * @return void */ @@ -86,7 +86,7 @@ class SetTest extends UnitTestCase { } /** * testNumericArrayCheck method - * + * * @access public * @return void */ @@ -105,7 +105,7 @@ class SetTest extends UnitTestCase { } /** * testKeyCheck method - * + * * @access public * @return void */ @@ -142,7 +142,7 @@ class SetTest extends UnitTestCase { } /** * testMerge method - * + * * @access public * @return void */ @@ -155,12 +155,12 @@ class SetTest extends UnitTestCase { $r = Set::merge('foo', 'bar'); $this->assertIdentical($r, array('foo', 'bar')); - + if (substr(phpversion(), 0, 1) >= 5) { $r = eval('class StaticSetCaller{static function merge($a, $b){return Set::merge($a, $b);}} return StaticSetCaller::merge("foo", "bar");'); $this->assertIdentical($r, array('foo', 'bar')); } - + $r = Set::merge('foo', array('user' => 'bob', 'no-bar'), 'bar'); $this->assertIdentical($r, array('foo', 'user' => 'bob', 'no-bar', 'bar')); @@ -239,7 +239,7 @@ class SetTest extends UnitTestCase { } /** * testSort method - * + * * @access public * @return void */ @@ -324,7 +324,7 @@ class SetTest extends UnitTestCase { } /** * testExtract method - * + * * @access public * @return void */ @@ -602,7 +602,7 @@ class SetTest extends UnitTestCase { $expected = array(3); $r = Set::extract('/Article[:last]/id', $common); $this->assertEqual($r, $expected); - + $expected = array(array('Comment' => $common[1]['Comment'][0])); $r = Set::extract('/Comment[addition=]', $common); $this->assertEqual($r, $expected); @@ -615,7 +615,7 @@ class SetTest extends UnitTestCase { */ /** * testMatches method - * + * * @access public * @return void */ @@ -643,7 +643,7 @@ class SetTest extends UnitTestCase { } /** * testClassicExtract method - * + * * @access public * @return void */ @@ -752,7 +752,7 @@ class SetTest extends UnitTestCase { } /** * testCheck method - * + * * @access public * @return void */ @@ -771,7 +771,7 @@ class SetTest extends UnitTestCase { } /** * testWritingWithFunkyKeys method - * + * * @access public * @return void */ @@ -788,7 +788,7 @@ class SetTest extends UnitTestCase { } /** * testCombine method - * + * * @access public * @return void */ @@ -797,7 +797,7 @@ class SetTest extends UnitTestCase { $this->assertFalse($result); $result = Set::combine('', '{n}.User.id', '{n}.User.Data'); $this->assertFalse($result); - + $a = array( array('User' => array('id' => 2, 'group_id' => 1, 'Data' => array('user' => 'mariano.iglesias','name' => 'Mariano Iglesias'))), @@ -906,7 +906,7 @@ class SetTest extends UnitTestCase { } /** * testMapReverse method - * + * * @access public * @return void */ @@ -1143,7 +1143,7 @@ class SetTest extends UnitTestCase { } /** * testFormatting method - * + * * @access public * @return void */ @@ -1190,7 +1190,7 @@ class SetTest extends UnitTestCase { } /** * testCountDim method - * + * * @access public * @return void */ @@ -1237,7 +1237,7 @@ class SetTest extends UnitTestCase { } /** * testMapNesting method - * + * * @access public * @return void */ @@ -1357,7 +1357,7 @@ class SetTest extends UnitTestCase { } /** * testNestedMappedData method - * + * * @access public * @return void */ @@ -1443,7 +1443,7 @@ class SetTest extends UnitTestCase { } /** * testPushDiff method - * + * * @access public * @return void */ @@ -1490,7 +1490,7 @@ class SetTest extends UnitTestCase { } /** * testXmlSetReverse method - * + * * @access public * @return void */ @@ -1552,7 +1552,7 @@ class SetTest extends UnitTestCase { ) )); $this->assertEqual($result, $expected); - $string =''; + $string =''; $xml = new Xml($string); $result = Set::reverse($xml); @@ -1561,7 +1561,7 @@ class SetTest extends UnitTestCase { $xml = new Xml('An example of a correctly reversed XMLNode'); $result = Set::reverse($xml); - $expected = array('Example' => + $expected = array('Example' => array( 'Item' => array( 'title' => 'An example of a correctly reversed XMLNode', @@ -1570,29 +1570,29 @@ class SetTest extends UnitTestCase { ) ); $this->assertIdentical($result, $expected); - + $xml = new Xml('title1title2'); $result = Set::reverse($xml); - $expected = + $expected = array('Example' => array( 'Item' => array( - 'attr' => '123', + 'attr' => '123', 'Titles' => array( array('Title' => 'title1'), array('Title' => 'title2'), - ) + ) ) ) ); $this->assertIdentical($result, $expected); - + $xml = new Xml('listtextforitems'); $result = Set::reverse($xml); - $expected = + $expected = array('Example' => array( 'attr' => 'ex_attr', 'Item' => array( - 'attr' => '123', + 'attr' => '123', 'titles' => 'list', 'value' => 'textforitems' ) @@ -1600,7 +1600,12 @@ class SetTest extends UnitTestCase { ); $this->assertIdentical($result, $expected); } - +/** + * testStrictKeyCheck method + * + * @access public + * @return void + */ function testStrictKeyCheck() { $set = new Set(array('a' => 'hi')); $this->assertFalse($set->check('a.b')); diff --git a/cake/tests/cases/libs/socket.test.php b/cake/tests/cases/libs/socket.test.php index 4b5b007f4..939d8fed7 100644 --- a/cake/tests/cases/libs/socket.test.php +++ b/cake/tests/cases/libs/socket.test.php @@ -138,13 +138,23 @@ class SocketTest extends UnitTestCase { $this->Socket->connect(); $this->assertEqual($this->Socket->read(26), null); } - +/** + * testLastError method + * + * @access public + * @return void + */ function testLastError() { $this->Socket = new CakeSocket(); $this->Socket->setLastError(4, 'some error here'); $this->assertEqual($this->Socket->lastError(), '4: some error here'); } - +/** + * testReset method + * + * @access public + * @return void + */ function testReset() { $config = array( 'persistent' => true, @@ -157,7 +167,12 @@ class SocketTest extends UnitTestCase { $anotherSocket->reset(); $this->assertEqual(array(), $anotherSocket->config); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Socket); } diff --git a/cake/tests/cases/libs/validation.test.php b/cake/tests/cases/libs/validation.test.php index 61eca4b1e..d0ab29fc7 100644 --- a/cake/tests/cases/libs/validation.test.php +++ b/cake/tests/cases/libs/validation.test.php @@ -1532,12 +1532,22 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::email('abc.efg@caphpkeinvalid.com', true)); $this->assertFalse(Validation::email('abc@example.abcd', true)); } - +/** + * testEmailCustomRegex method + * + * @access public + * @return void + */ function testEmailCustomRegex() { $this->assertTrue(Validation::email('abc.efg@cakephp.org', null, '/^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i')); $this->assertFalse(Validation::email('abc.efg@com.caphpkeinvalid', null, '/^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i')); } - +/** + * testEqualTo method + * + * @access public + * @return void + */ function testEqualTo() { $this->assertTrue(Validation::equalTo("1", "1")); $this->assertFalse(Validation::equalTo(1, "1")); @@ -1546,7 +1556,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::equalTo(0, false)); $this->assertFalse(Validation::equalTo(null, false)); } - +/** + * testIp method + * + * @access public + * @return void + */ function testIp() { $this->assertTrue(Validation::ip('0.0.0.0')); $this->assertTrue(Validation::ip('192.168.1.156')); @@ -1555,19 +1570,34 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::ip('127.0.0.a')); $this->assertFalse(Validation::ip('127.0.0.256')); } - +/** + * testMaxLength method + * + * @access public + * @return void + */ function testMaxLength() { $this->assertTrue(Validation::maxLength('ab', 3)); $this->assertTrue(Validation::maxLength('abc', 3)); $this->assertFalse(Validation::maxLength('abcd', 3)); } - +/** + * testMinLength method + * + * @access public + * @return void + */ function testMinLength() { $this->assertFalse(Validation::minLength('ab', 3)); $this->assertTrue(Validation::minLength('abc', 3)); $this->assertTrue(Validation::minLength('abcd', 3)); } - +/** + * testUrl method + * + * @access public + * @return void + */ function testUrl() { $this->assertTrue(Validation::url('http://www.cakephp.org')); $this->assertTrue(Validation::url('http://cakephp.org')); @@ -1596,13 +1626,23 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::url('http://this-domain-is-too-loooooong-by-icann-rules-maximum-length-is-63.com')); $this->assertTrue(Validation::url('http://www.domain.com/blogs/index.php?blog=6&tempskin=_rss2')); } - +/** + * testInList method + * + * @access public + * @return void + */ function testInList() { $this->assertTrue(Validation::inList('one', array('one', 'two'))); $this->assertTrue(Validation::inList('two', array('one', 'two'))); $this->assertFalse(Validation::inList('three', array('one', 'two'))); } - +/** + * testValidNumber method + * + * @access public + * @return void + */ function testValidNumber() { $this->assertTrue(Validation::custom('12345', VALID_NUMBER)); $this->assertTrue(Validation::custom('-12345', VALID_NUMBER)); @@ -1623,7 +1663,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::custom('.2345', VALID_NUMBER)); $this->assertFalse(Validation::custom('12345.', VALID_NUMBER)); } - +/** + * testRange method + * + * @access public + * @return void + */ function testRange() { $this->assertFalse(Validation::range(20, 100, 1)); $this->assertTrue(Validation::range(20, 1, 100)); @@ -1633,7 +1678,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertTrue(Validation::range(-5, -10, 1)); $this->assertFalse(Validation::range('word')); } - +/** + * testExtension method + * + * @access public + * @return void + */ function testExtension() { $this->assertTrue(Validation::extension('extension.jpeg')); $this->assertTrue(Validation::extension('extension.JPEG')); @@ -1657,7 +1707,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::extension(array('noextension', 'extension.JPG', 'extension.gif', 'extension.png'))); $this->assertFalse(Validation::extension(array('extension.pdf', 'extension.JPG', 'extension.gif', 'extension.png'))); } - +/** + * testMoney method + * + * @access public + * @return void + */ function testMoney() { $this->assertTrue(Validation::money('$100')); $this->assertTrue(Validation::money('$100.11')); @@ -1684,7 +1739,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::money('100.1€', 'right')); $this->assertFalse(Validation::money('100.1111€', 'right')); } - +/** + * testNumeric method + * + * @access public + * @return void + */ function testNumeric() { $this->assertFalse(Validation::numeric('teststring')); $this->assertFalse(Validation::numeric('1.1test')); @@ -1695,7 +1755,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertTrue(Validation::numeric(2.2)); $this->assertTrue(Validation::numeric('2.2')); } - +/** + * testPhone method + * + * @access public + * @return void + */ function testPhone() { $this->assertFalse(Validation::phone('teststring')); $this->assertFalse(Validation::phone('1-(33)-(333)-(4444)')); @@ -1712,7 +1777,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertTrue(Validation::phone('1.(333).333.4444')); $this->assertTrue(Validation::phone('1-333-333-4444')); } - +/** + * testPostal method + * + * @access public + * @return void + */ function testPostal() { $this->assertFalse(Validation::postal('111', null, 'de')); $this->assertFalse(Validation::postal('1111', null, 'de')); @@ -1759,7 +1829,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::postal('13A89-4333')); $this->assertTrue(Validation::postal('13089-3333')); } - +/** + * testSsn method + * + * @access public + * @return void + */ function testSsn() { $this->assertFalse(Validation::ssn('111-333', null, 'dk')); $this->assertFalse(Validation::ssn('111111-333', null, 'dk')); @@ -1775,7 +1850,12 @@ class ValidationTestCase extends UnitTestCase { $this->assertFalse(Validation::ssn('111-33-333', null, 'us')); $this->assertTrue(Validation::ssn('111-33-4333', null, 'us')); } - +/** + * testUserDefined method + * + * @access public + * @return void + */ function testUserDefined() { $validator = new CustomValidator; $this->assertFalse(Validation::userDefined('33', $validator, 'customValidate')); diff --git a/cake/tests/cases/libs/view/helper.test.php b/cake/tests/cases/libs/view/helper.test.php index 284539cd5..5749d4f18 100644 --- a/cake/tests/cases/libs/view/helper.test.php +++ b/cake/tests/cases/libs/view/helper.test.php @@ -374,7 +374,12 @@ class HelperTest extends UnitTestCase { $this->assertEqual($this->View->fieldSuffix, null); } - +/** + * testFieldSuffixForDate method + * + * @access public + * @return void + */ function testFieldSuffixForDate() { // PHP4 reference hack ClassRegistry::removeObject('view'); @@ -394,7 +399,12 @@ class HelperTest extends UnitTestCase { $this->assertEqual($this->View->association, null); $this->assertEqual($this->View->fieldSuffix, 'month'); } - +/** + * testMulitDimensionValue method + * + * @access public + * @return void + */ function testMulitDimensionValue() { $this->Helper->data = array(); for($i = 0; $i < 2; $i++) { @@ -422,7 +432,12 @@ class HelperTest extends UnitTestCase { $result = $this->Helper->value('0.id'); $this->assertEqual($result, 100); } - +/** + * testClean method + * + * @access public + * @return void + */ function testClean() { $result = $this->Helper->clean(array()); $this->assertEqual($result, null); @@ -434,7 +449,12 @@ class HelperTest extends UnitTestCase { $this->assertEqual($result, 'with something'); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Helper, $this->View); ClassRegistry::flush(); diff --git a/cake/tests/cases/libs/view/helpers/ajax.test.php b/cake/tests/cases/libs/view/helpers/ajax.test.php index 71447c221..448ead57b 100644 --- a/cake/tests/cases/libs/view/helpers/ajax.test.php +++ b/cake/tests/cases/libs/view/helpers/ajax.test.php @@ -611,7 +611,12 @@ class AjaxTest extends CakeTestCase { $this->assertNoPattern('/]+[^type]=[^<>]*>/', $result); $this->assertPattern('/^]+>\s*' . str_replace('/', '\\/', preg_quote('//')) . '\s*<\/script>$/', $result); } - +/** + * testRemoteFunction method + * + * @access public + * @return void + */ function testRemoteFunction() { $result = $this->Ajax->remoteFunction(array('complete' => 'testComplete();')); $expected = 'new Ajax.Request(\'/\', {asynchronous:true, evalScripts:true, onComplete:function(request, json) {testComplete();}})'; @@ -628,7 +633,12 @@ class AjaxTest extends CakeTestCase { $result = $this->Ajax->remoteFunction(array('update' => 'myDiv', 'confirm' => 'Are you sure?')); $expected = 'if (confirm(\'Are you sure?\')) { new Ajax.Updater(\'myDiv\',\'/\', {asynchronous:true, evalScripts:true, requestHeaders:[\'X-Update\', \'myDiv\']}); } else { event.returnValue = false; return false; }'; } - +/** + * testDiv method + * + * @access public + * @return void + */ function testDiv() { $oldXUpdate = env('HTTP_X_UPDATE'); @@ -654,7 +664,12 @@ class AjaxTest extends CakeTestCase { $_SERVER['HTTP_X_UPDATE'] = $oldXUpdate; } - +/** + * testAfterRender method + * + * @access public + * @return void + */ function testAfterRender() { $oldXUpdate = env('HTTP_X_UPDATE'); $this->Ajax->Javascript =& new TestJavascriptHelper(); @@ -676,7 +691,12 @@ class AjaxTest extends CakeTestCase { $_SERVER['HTTP_X_UPDATE'] = $oldXUpdate; } - +/** + * testEditor method + * + * @access public + * @return void + */ function testEditor() { $result = $this->Ajax->editor('myDiv', '/'); $this->assertPattern('/^]+type="text\/javascript"[^<>]*>.+<\/script>$/s', $result); @@ -703,7 +723,12 @@ class AjaxTest extends CakeTestCase { $this->assertPattern('/^]+>\s*' . str_replace('/', '\\/', preg_quote('//')) . '\s*<\/script>$/s', $result); $this->assertPattern('/^.+\s*' . str_replace('/', '\\/', preg_quote('var myVar = new Ajax.InPlaceEditor(\'myDiv\', \'/\', {ajaxOptions:{asynchronous:true, evalScripts:true}});')) . '\s*.+$/s', $result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Ajax); ClassRegistry::flush(); diff --git a/cake/tests/cases/libs/view/helpers/cache.test.php b/cake/tests/cases/libs/view/helpers/cache.test.php index 3ab44e622..ce1a8fcea 100644 --- a/cake/tests/cases/libs/view/helpers/cache.test.php +++ b/cake/tests/cases/libs/view/helpers/cache.test.php @@ -57,7 +57,12 @@ class CacheHelperTest extends UnitTestCase { function setUp() { $this->Cache = new CacheHelper(); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Cache); } diff --git a/cake/tests/cases/libs/view/helpers/form.test.php b/cake/tests/cases/libs/view/helpers/form.test.php index efefa3387..c7849c1f5 100644 --- a/cake/tests/cases/libs/view/helpers/form.test.php +++ b/cake/tests/cases/libs/view/helpers/form.test.php @@ -3652,7 +3652,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testGetFormCreate method + * + * @access public + * @return void + */ function testGetFormCreate() { $result = $this->Form->create('Contact', array('type' => 'get')); $this->assertTags($result, array('form' => array('id' => 'ContactAddForm', 'method' => 'get', 'action' => '/contacts/add/'))); @@ -3667,7 +3672,12 @@ class FormHelperTest extends CakeTestCase { $result = $this->Form->text('user_form'); $this->assertTags($result, array('input' => array('name' => 'user_form', 'type' => 'text', 'value' => '', 'id' => 'ContactUserForm'))); } - +/** + * testEditFormWithData method + * + * @access public + * @return void + */ function testEditFormWithData() { $this->Form->data = array('Person' => array( 'id' => 1, @@ -3696,7 +3706,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testFormMagicInput method + * + * @access public + * @return void + */ function testFormMagicInput() { $result = $this->Form->create('Contact'); $expected = array( @@ -3839,7 +3854,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testForMagicInputNonExistingNorValidated method + * + * @access public + * @return void + */ function testForMagicInputNonExistingNorValidated() { $result = $this->Form->create('Contact'); $expected = array( @@ -3878,7 +3898,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testFormMagicInputLabel method + * + * @access public + * @return void + */ function testFormMagicInputLabel() { $result = $this->Form->create('Contact'); $expected = array( @@ -3956,7 +3981,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testFormEnd method + * + * @access public + * @return void + */ function testFormEnd() { $this->assertEqual($this->Form->end(), ''); @@ -4014,7 +4044,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testMultipleFormWithIdFields method + * + * @access public + * @return void + */ function testMultipleFormWithIdFields() { $this->Form->create('UserForm'); @@ -4027,7 +4062,12 @@ class FormHelperTest extends CakeTestCase { $result = $this->Form->input('MyOther.id'); $this->assertTags($result, array('input' => array('type' => 'hidden', 'name' => 'data[MyOther][id]', 'value' => '', 'id' => 'MyOtherId'))); } - +/** + * testDbLessModel method + * + * @access public + * @return void + */ function testDbLessModel() { $this->Form->create('TestMail'); @@ -4055,7 +4095,12 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { ClassRegistry::removeObject('view'); ClassRegistry::removeObject('Contact'); @@ -4068,7 +4113,13 @@ class FormHelperTest extends CakeTestCase { ClassRegistry::removeObject('ValidateProfile'); unset($this->Form->Html, $this->Form, $this->Controller, $this->View); } - +/** + * sortFields method + * + * @param mixed $fields + * @access private + * @return void + */ function __sortFields($fields) { foreach ($fields as $key => $value) { if ($key{0} !== '_') { diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index 3854de432..be1d1cc84 100644 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -757,7 +757,12 @@ class HtmlHelperTest extends CakeTestCase { $expected = "td content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3"; $this->assertEqual($result, $expected); } - +/** + * testTag method + * + * @access public + * @return void + */ function testTag() { $result = $this->Html->tag('div'); $this->assertTags($result, 'Html->tag('div', '', 'class-name', true); $this->assertTags($result, array('div' => array('class' => 'class-name'), '<text>', '/div')); } - +/** + * testDiv method + * + * @access public + * @return void + */ function testDiv() { $result = $this->Html->div('class-name'); $this->assertTags($result, array('div' => array('class' => 'class-name'))); @@ -783,7 +793,12 @@ class HtmlHelperTest extends CakeTestCase { $this->assertTags($result, array('div' => array('class' => 'class-name'), '<text>', '/div')); } - +/** + * testPara method + * + * @access public + * @return void + */ function testPara() { $result = $this->Html->para('class-name'); $this->assertTags($result, array('p' => array('class' => 'class-name'))); @@ -794,7 +809,12 @@ class HtmlHelperTest extends CakeTestCase { $result = $this->Html->para('class-name', '', array(), true); $this->assertTags($result, array('p' => array('class' => 'class-name'), '<text>', '/p')); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Html); } diff --git a/cake/tests/cases/libs/view/helpers/javascript.test.php b/cake/tests/cases/libs/view/helpers/javascript.test.php index 39db0c579..8d4c6d038 100644 --- a/cake/tests/cases/libs/view/helpers/javascript.test.php +++ b/cake/tests/cases/libs/view/helpers/javascript.test.php @@ -577,7 +577,12 @@ class JavascriptTest extends UnitTestCase { $result = $this->Javascript->getCache(); $this->assertTrue(empty($result)); } - +/** + * testEscapeScript method + * + * @access public + * @return void + */ function testEscapeScript() { $result = $this->Javascript->escapeScript(''); $expected = ''; @@ -599,7 +604,12 @@ class JavascriptTest extends UnitTestCase { $expected = 'CakePHP: \\\'Rapid Development Framework\\\''; $this->assertEqual($result, $expected); } - +/** + * testEscapeString method + * + * @access public + * @return void + */ function testEscapeString() { $result = $this->Javascript->escapeString(''); $expected = ''; @@ -621,7 +631,12 @@ class JavascriptTest extends UnitTestCase { $expected = 'CakePHP: \\\'Rapid Development Framework\\\''; $this->assertEqual($result, $expected); } - +/** + * testAfterRender method + * + * @access public + * @return void + */ function testAfterRender() { $this->Javascript->cacheEvents(); $result = $this->Javascript->event('myId', 'click', 'something();'); diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/cake/tests/cases/libs/view/helpers/js.test.php index b9679e03d..d44ff6640 100644 --- a/cake/tests/cases/libs/view/helpers/js.test.php +++ b/cake/tests/cases/libs/view/helpers/js.test.php @@ -57,7 +57,12 @@ class JsTest extends UnitTestCase { function setUp() { $this->Js = new JsHelper(); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Js); } diff --git a/cake/tests/cases/libs/view/helpers/number.test.php b/cake/tests/cases/libs/view/helpers/number.test.php index 191e16f2a..55d118c5f 100644 --- a/cake/tests/cases/libs/view/helpers/number.test.php +++ b/cake/tests/cases/libs/view/helpers/number.test.php @@ -312,7 +312,12 @@ class NumberTest extends UnitTestCase { $expected = sprintf("%01.2f", $float/1024/1024/1024/1024).' TB'; $this->assertEqual($expected, $result); } - +/** + * testToPercentage method + * + * @access public + * @return void + */ function testToPercentage() { $result = $this->Number->toPercentage(45, 0); $expected = '45%'; @@ -333,7 +338,12 @@ class NumberTest extends UnitTestCase { } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Number); } diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index 10c597e93..e22785e59 100644 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -511,7 +511,12 @@ class PaginatorTest extends UnitTestCase { $this->assertEqual($result, $expected); } - + /** + * testHasPage method + * + * @access public + * @return void + */ function testHasPage() { $result = $this->Paginator->hasPage('Article', 15); $this->assertFalse($result); @@ -525,7 +530,12 @@ class PaginatorTest extends UnitTestCase { $result = $this->Paginator->hasPage(2); $this->assertTrue($result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Paginator); } diff --git a/cake/tests/cases/libs/view/helpers/rss.test.php b/cake/tests/cases/libs/view/helpers/rss.test.php index cdbc704fb..f823fed5d 100644 --- a/cake/tests/cases/libs/view/helpers/rss.test.php +++ b/cake/tests/cases/libs/view/helpers/rss.test.php @@ -38,17 +38,32 @@ App::import('Helper', array('Rss', 'Time')); * @subpackage cake.tests.cases.libs.view.helpers */ class RssTest extends CakeTestCase { - +/** + * setUp method + * + * @access public + * @return void + */ function setUp() { $this->Rss =& new RssHelper(); $this->Rss->Time =& new TimeHelper(); $this->Rss->beforeRender(); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Rss); } - +/** + * testAddNamespace method + * + * @access public + * @return void + */ function testAddNamespace() { $this->Rss->addNs('custom', 'http://example.com/dtd.xml'); $manager =& XmlManager::getInstance(); @@ -56,7 +71,12 @@ class RssTest extends CakeTestCase { $expected = array('custom' => 'http://example.com/dtd.xml'); $this->assertEqual($manager->namespaces, $expected); } - +/** + * testRemoveNamespace method + * + * @access public + * @return void + */ function testRemoveNamespace() { $this->Rss->addNs('custom', 'http://example.com/dtd.xml'); $this->Rss->addNs('custom2', 'http://example.com/dtd2.xml'); @@ -69,7 +89,12 @@ class RssTest extends CakeTestCase { $expected = array('custom2' => 'http://example.com/dtd2.xml'); $this->assertEqual($manager->namespaces, $expected); } - + /** + * testDocument method + * + * @access public + * @return void + */ function testDocument() { $res = $this->Rss->document(); $this->assertPattern('/^$/', $res); @@ -85,7 +110,12 @@ class RssTest extends CakeTestCase { $this->assertPattern('/]+contrived="parameter"[^<>]*>/', $res); $this->assertNoPattern('/]+[^version|contrived]=[^<>]*>/', $res); } - +/** + * testChannel method + * + * @access public + * @return void + */ function testChannel() { $attrib = array('a' => '1', 'b' => '2'); $elements['title'] = 'title'; @@ -99,7 +129,12 @@ class RssTest extends CakeTestCase { $this->assertPattern('//', $res); $this->assertPattern('/content<\/channel>$/', $res); } - +/** + * testChannelElementLevelAttrib method + * + * @access public + * @return void + */ function testChannelElementLevelAttrib() { $attrib = array(); $elements['title'] = 'title'; @@ -113,7 +148,12 @@ class RssTest extends CakeTestCase { $this->assertPattern('//', $res); $this->assertPattern('/content<\/channel>$/', $res); } - +/** + * testItems method + * + * @access public + * @return void + */ function testItems() { $items = array( array('title' => 'title1', 'guid' => 'http://www.example.com/guid1', 'link' => 'http://www.example.com/link1', 'description' => 'description1'), @@ -139,7 +179,12 @@ class RssTest extends CakeTestCase { $result = $this->Rss->items(array()); $this->assertEqual($result, ''); } - +/** + * testItem method + * + * @access public + * @return void + */ function testItem() { $result = $this->Rss->item(null, array("title"=>"My title","description"=>"My description","link"=>"http://www.google.com/")); $expecting = 'My titleMy descriptionhttp://www.google.com/http://www.google.com/'; @@ -212,10 +257,20 @@ class RssTest extends CakeTestCase { ); $this->assertTags($result, $expected); } - +/** + * testTime method + * + * @access public + * @return void + */ function testTime() { } - +/** + * testElementAttrNotInParent method + * + * @access public + * @return void + */ function testElementAttrNotInParent() { $attributes = array('title' => 'Some Title', 'link' => 'http://link.com', 'description' => 'description'); $elements = array('enclosure' => array('url' => 'http://test.com')); @@ -229,4 +284,4 @@ class RssTest extends CakeTestCase { $this->assertTags($result, $expected); } } -?> \ No newline at end of file +?> diff --git a/cake/tests/cases/libs/view/helpers/session.test.php b/cake/tests/cases/libs/view/helpers/session.test.php index f9b8866cf..c9be0f7b3 100644 --- a/cake/tests/cases/libs/view/helpers/session.test.php +++ b/cake/tests/cases/libs/view/helpers/session.test.php @@ -180,7 +180,12 @@ class SessionHelperTest extends CakeTestCase { $result = $this->Session->id(); $this->assertEqual($id, $result); } - +/** + * testError method + * + * @access public + * @return void + */ function testError() { $result = $this->Session->error(); $this->assertFalse($result); @@ -190,7 +195,12 @@ class SessionHelperTest extends CakeTestCase { $expected = "CauseError doesn't exist"; $this->assertEqual($result, $expected); } - +/** + * testDisabling method + * + * @access public + * @return void + */ function testDisabling() { Configure::write('Session.start', false); $this->Session = new SessionHelper(); @@ -206,7 +216,12 @@ class SessionHelperTest extends CakeTestCase { ob_clean(); $this->assertFalse($result); } - +/** + * testValid method + * + * @access public + * @return void + */ function testValid() { //wierd it always ends up false in the test suite //$this->assertFalse($this->Session->valid()); diff --git a/cake/tests/cases/libs/view/helpers/text.test.php b/cake/tests/cases/libs/view/helpers/text.test.php index 3d73f059e..24345a504 100644 --- a/cake/tests/cases/libs/view/helpers/text.test.php +++ b/cake/tests/cases/libs/view/helpers/text.test.php @@ -254,7 +254,12 @@ class TextTest extends UnitTestCase { $result = $this->Text->highlight($text, array('test'), '\1'); $this->assertEqual($expected, $result); } - +/** + * testExcerpt method + * + * @access public + * @return void + */ function testExcerpt() { $text = 'This is a phrase with test text to play with'; @@ -278,7 +283,12 @@ class TextTest extends UnitTestCase { $result = $this->Text->excerpt($text, 'phrase', 2, '...'); $this->assertEqual($expected, $result); } - +/** + * testExcerptCaseInsensitivity method + * + * @access public + * @return void + */ function testExcerptCaseInsensitivity() { $text = 'This is a phrase with test text to play with'; @@ -290,7 +300,12 @@ class TextTest extends UnitTestCase { $result = $this->Text->excerpt($text, 'NOT_FOUND', 9, '...'); $this->assertEqual($expected, $result); } - +/** + * testListGeneration method + * + * @access public + * @return void + */ function testListGeneration() { $result = $this->Text->toList(array('Larry', 'Curly', 'Moe')); $this->assertEqual($result, 'Larry, Curly and Moe'); @@ -298,7 +313,12 @@ class TextTest extends UnitTestCase { $result = $this->Text->toList(array('Dusty', 'Lucky', 'Ned'), 'y'); $this->assertEqual($result, 'Dusty, Lucky y Ned'); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Text); } diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/cake/tests/cases/libs/view/helpers/time.test.php index 3485f34cd..be441815e 100644 --- a/cake/tests/cases/libs/view/helpers/time.test.php +++ b/cake/tests/cases/libs/view/helpers/time.test.php @@ -525,7 +525,12 @@ class TimeTest extends UnitTestCase { $result = $this->Time->isThisYear(mktime(0, 0, 0, rand(1, 12), rand(1, 28), date('Y'))); $this->assertTrue($result); } - + /** + * testOfWasYesterday method + * + * @access public + * @return void + */ function testOfWasYesterday() { $result = $this->Time->wasYesterday('+1 day'); $this->assertFalse($result); @@ -540,7 +545,12 @@ class TimeTest extends UnitTestCase { $result = $this->Time->wasYesterday('-2 days'); $this->assertFalse($result); } - + /** + * testOfIsTomorrow method + * + * @access public + * @return void + */ function testOfIsTomorrow() { $result = $this->Time->isTomorrow('+1 day'); $this->assertTrue($result); @@ -551,7 +561,12 @@ class TimeTest extends UnitTestCase { $result = $this->Time->isTomorrow('-1 day'); $this->assertFalse($result); } - +/** + * testOfWasWithinLast method + * + * @access public + * @return void + */ function testOfWasWithinLast() { $this->assertTrue($this->Time->wasWithinLast('1 day', '-1 day')); $this->assertTrue($this->Time->wasWithinLast('1 week', '-1 week')); @@ -591,7 +606,12 @@ class TimeTest extends UnitTestCase { $this->assertTrue($this->Time->wasWithinLast('1 ', '-1 minute')); $this->assertTrue($this->Time->wasWithinLast('1 ', '-23 hours -59 minutes -59 seconds')); } - + /** + * testUserOffset method + * + * @access public + * @return void + */ function testUserOffset() { $timezoneServer = new DateTimeZone(date_default_timezone_get()); $timeServer = new DateTime('now', $timezoneServer); @@ -601,7 +621,12 @@ class TimeTest extends UnitTestCase { $result = $this->Time->fromString(time(), $yourTimezone); $this->assertEqual($result, $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Time); } diff --git a/cake/tests/cases/libs/view/helpers/xml.test.php b/cake/tests/cases/libs/view/helpers/xml.test.php index a9b5a569b..910e503d3 100644 --- a/cake/tests/cases/libs/view/helpers/xml.test.php +++ b/cake/tests/cases/libs/view/helpers/xml.test.php @@ -31,14 +31,36 @@ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { } uses('view'.DS.'helpers'.DS.'app_helper', 'controller'.DS.'controller', 'model'.DS.'model', 'view'.DS.'helper', 'view'.DS.'helpers'.DS.'xml'); - +/** + * TestXml class + * + * @package cake + * @subpackage cake.tests.cases.libs.view.helpers + */ class TestXml extends Object { +/** + * content property + * + * @var string '' + * @access public + */ var $content = ''; - +/** + * construct method + * + * @param mixed $content + * @access private + * @return void + */ function __construct($content) { $this->content = $content; } - +/** + * toString method + * + * @access public + * @return void + */ function toString() { return $this->content; } @@ -50,12 +72,22 @@ class TestXml extends Object { * @subpackage cake.tests.cases.libs.view.helpers */ class XmlHelperTest extends UnitTestCase { - +/** + * setUp method + * + * @access public + * @return void + */ function setUp() { $this->Xml =& new XmlHelper(); $this->Xml->beforeRender(); } - +/** + * testAddNamespace method + * + * @access public + * @return void + */ function testAddNamespace() { $this->Xml->addNs('custom', 'http://example.com/dtd.xml'); $manager =& XmlManager::getInstance(); @@ -63,7 +95,12 @@ class XmlHelperTest extends UnitTestCase { $expected = array('custom' => 'http://example.com/dtd.xml'); $this->assertEqual($manager->namespaces, $expected); } - +/** + * testRemoveNamespace method + * + * @access public + * @return void + */ function testRemoveNamespace() { $this->Xml->addNs('custom', 'http://example.com/dtd.xml'); $this->Xml->addNs('custom2', 'http://example.com/dtd2.xml'); @@ -76,13 +113,23 @@ class XmlHelperTest extends UnitTestCase { $expected = array('custom2' => 'http://example.com/dtd2.xml'); $this->assertEqual($manager->namespaces, $expected); } - +/** + * testRenderZeroElement method + * + * @access public + * @return void + */ function testRenderZeroElement() { $result = $this->Xml->elem('count', null, 0); $expected = '0'; $this->assertEqual($result, $expected); } - +/** + * testRenderElementWithNamespace method + * + * @access public + * @return void + */ function testRenderElementWithNamespace() { $result = $this->Xml->elem('count', array('namespace' => 'myNameSpace'), 'content'); $expected = 'content'; @@ -96,7 +143,12 @@ class XmlHelperTest extends UnitTestCase { $result .= $this->Xml->closeElem(); $this->assertEqual($result, $expected); } - + /** + * testRenderElementWithComplexContent method + * + * @access public + * @return void + */ function testRenderElementWithComplexContent() { $result = $this->Xml->elem('count', array('namespace' => 'myNameSpace'), array('contrived' => 'content')); $expected = ''; @@ -106,7 +158,12 @@ class XmlHelperTest extends UnitTestCase { $expected = ''; $this->assertEqual($result, $expected); } - +/** + * testSerialize method + * + * @access public + * @return void + */ function testSerialize() { $data = array( 'test1' => 'test with no quotes', @@ -124,7 +181,12 @@ class XmlHelperTest extends UnitTestCase { $expected = ''; $this->assertIdentical($result, $expected); } - +/** + * testHeader method + * + * @access public + * @return void + */ function testHeader() { $expectedDefaultEncoding = Configure::read('App.encoding'); if (empty($expectedDefaultEncoding)) { @@ -157,10 +219,15 @@ class XmlHelperTest extends UnitTestCase { $expected = ''; $this->assertIdentical($result, $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->Xml); } } -?> \ No newline at end of file +?> diff --git a/cake/tests/cases/libs/view/theme.test.php b/cake/tests/cases/libs/view/theme.test.php index a23139daa..a12a4376f 100644 --- a/cake/tests/cases/libs/view/theme.test.php +++ b/cake/tests/cases/libs/view/theme.test.php @@ -214,7 +214,12 @@ class ThemeViewTest extends UnitTestCase { $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); } - +/** + * testMissingView method + * + * @access public + * @return void + */ function testMissingView() { $this->Controller->plugin = null; $this->Controller->name = 'Pages'; @@ -233,7 +238,12 @@ class ThemeViewTest extends UnitTestCase { $this->assertPattern("/PagesController::/", $expected); $this->assertPattern("/views\/themed\/my_theme\/pages\/does_not_exist.ctp/", $expected); } - +/** + * testMissingLayout method + * + * @access public + * @return void + */ function testMissingLayout() { $this->Controller->plugin = null; $this->Controller->name = 'Posts'; @@ -250,7 +260,12 @@ class ThemeViewTest extends UnitTestCase { $this->assertPattern("/Missing Layout/", $expected); $this->assertPattern("/views\/themed\/my_theme\/layouts\/whatever.ctp/", $expected); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->ThemeView); unset($this->PostsController); diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index d4619315d..64d946fd1 100644 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -469,7 +469,12 @@ class ViewTest extends CakeTestCase { $this->assertPattern('/modified in the afterlife/', $result); $this->assertPattern('/This is my view output/', $result); } - +/** + * testRenderLoadHelper method + * + * @access public + * @return void + */ function testRenderLoadHelper() { $this->PostsController->helpers = array('Html', 'Form', 'Ajax'); $View = new TestView($this->PostsController); @@ -496,7 +501,12 @@ class ViewTest extends CakeTestCase { $this->assertTrue(is_object($helpers['ajax']->Html)); $this->assertTrue(is_object($helpers['testPluginHelper']->TestPluginOtherHelper)); } - +/** + * testRender method + * + * @access public + * @return void + */ function testRender() { $View = new TestView($this->PostsController); $result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index')); @@ -566,7 +576,12 @@ class ViewTest extends CakeTestCase { $this->assertFalse(empty($result)); @unlink($path); } - +/** + * testSet method + * + * @access public + * @return void + */ function testSet() { $View = new TestView($this->PostsController); $View->viewVars = array(); @@ -589,7 +604,12 @@ class ViewTest extends CakeTestCase { $View->set(array('key3' => 'value3')); $this->assertIdentical($View->getVar('key3'), 'value3'); } - +/** + * testEntityReference method + * + * @access public + * @return void + */ function testEntityReference() { $View = new TestView($this->PostsController); $View->model = 'Post'; @@ -600,7 +620,12 @@ class ViewTest extends CakeTestCase { $View->field = 'user_id'; $this->assertEqual($View->entity(), array('Comment', 'user_id')); } - +/** + * testBadExt method + * + * @access public + * @return void + */ function testBadExt() { $this->PostsController->action = 'something'; $this->PostsController->ext = '.whatever'; @@ -614,7 +639,12 @@ class ViewTest extends CakeTestCase { $this->assertPattern("/PostsController::<\/em>something\(\)<\/em>/", $result); $this->assertPattern("/posts\/this_is_missing.whatever/", $result); } - +/** + * tearDown method + * + * @access public + * @return void + */ function tearDown() { unset($this->View); unset($this->PostsController); diff --git a/cake/tests/cases/libs/xml.test.php b/cake/tests/cases/libs/xml.test.php index a4190d563..38eb5dc5a 100644 --- a/cake/tests/cases/libs/xml.test.php +++ b/cake/tests/cases/libs/xml.test.php @@ -37,12 +37,12 @@ App::import('Core', 'Xml'); class XmlTest extends UnitTestCase { /** * testRootTagParsing method - * + * * @access public * @return void */ function testRootTagParsing() { - $input = '<' . '?xml version="1.0" encoding="UTF-8" ?' . '>' . "\n" . ''; + $input = '<' . '?xml version="1.0" encoding="UTF-8" ?' . '>' . "\n" . ''; $xml = new Xml($input); $this->assertEqual($xml->children[0]->name, 'plugin'); $this->assertEqual($xml->children[0]->children[0]->name, 'current'); @@ -50,7 +50,7 @@ class XmlTest extends UnitTestCase { } /** * testSerialization method - * + * * @access public * @return void */ @@ -72,7 +72,7 @@ class XmlTest extends UnitTestCase { $xml = new Xml($input); $result = preg_replace("/\n/",'', $xml->toString(false)); - $expected = '1Touch Screen Kiosk1Financial2<client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry></project>'; + $expected = '<project><id>1</id><title/><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry></project>'; $xml = new Xml($input, array('format' => 'tags')); $result = $xml->toString(array('header' => false, 'cdata' => false)); @@ -191,7 +191,7 @@ class XmlTest extends UnitTestCase { } /** * testNestedArraySerialization method - * + * * @access public * @return void */ @@ -224,155 +224,155 @@ class XmlTest extends UnitTestCase { ) ) ); - $expected = '<project><id>1</id><title /><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type><id>15</id><name>Print</name></media_type><media_type><id>7</id><name>Web Demo</name></media_type><media_type><id>6</id><name>CD-ROM</name></media_type></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry><business_solution><id>4</id><name>Build Relationship</name></business_solution><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type><id>17</id><name>Web</name></media_type><media_type><id>6</id><name>CD-ROM</name></media_type></project>'; - + $expected = '<project><id>1</id><title/><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type><id>15</id><name>Print</name></media_type><media_type><id>7</id><name>Web Demo</name></media_type><media_type><id>6</id><name>CD-ROM</name></media_type></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry><business_solution><id>4</id><name>Build Relationship</name></business_solution><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type><id>17</id><name>Web</name></media_type><media_type><id>6</id><name>CD-ROM</name></media_type></project>'; + $xml = new Xml($input, array('format' => 'tags')); $result = $xml->toString(array('header' => false, 'cdata' => false)); $this->assertEqual($expected, $result); } - /* +/* * Not implemented yet */ - // function testChildFilter() { - // $input = array( - // array( - // 'Project' => array('id' => 1, 'title' => null, 'client_id' => 1, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 1, 'industry_id' => 1, 'modified' => null, 'created' => null), - // 'Style' => array('id' => null, 'name' => null), - // 'JobType' => array('id' => 1, 'name' => 'Touch Screen Kiosk'), - // 'Industry' => array('id' => 1, 'name' => 'Financial'), - // 'BusinessSolution' => array(array('id' => 6, 'name' => 'Convert Sales')), - // 'MediaType' => array( - // array('id' => 15, 'name' => 'Print'), - // array('id' => 7, 'name' => 'Web Demo'), - // array('id' => 6, 'name' => 'CD-ROM') - // ) - // ), - // array( - // 'Project' => array('id' => 2, 'title' => null, 'client_id' => 2, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 2, 'industry_id' => 2, 'modified' => '2007-11-26 14:48:36', 'created' => null), - // 'Style' => array('id' => null, 'name' => null), - // 'JobType' => array('id' => 2, 'name' => 'Awareness Campaign'), - // 'Industry' => array('id' => 2, 'name' => 'Education'), - // 'BusinessSolution' => array( - // array('id' => 4, 'name' => 'Build Relationship'), - // array('id' => 6, 'name' => 'Convert Sales') - // ), - // 'MediaType' => array( - // array('id' => 17, 'name' => 'Web'), - // array('id' => 6, 'name' => 'CD-ROM') - // ) - // ) - // ); - // - // $xml = new Xml($input, array('format' => 'tags', 'tags' => array( - // 'MediaType' => array('value' => 'id', 'children' => false), - // 'JobType' => array('children' => array()), - // 'Industry' => array('children' => array('name')), - // 'show' => false - // ))); - // - // $result = $xml->toString(array('header' => false, 'cdata' => false)); - // $expected = '<project><id>1</id><title /><client_id>1</client_id><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><name>Financial</name></industry><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type>15</media_type><media_type>7</media_type><media_type>6</media_type></project><project><id>2</id><title /><client_id>2</client_id><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><name>Education</name></industry><business_solution><id>4</id><name>Build Relationship</name></business_solution><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type>17</media_type><media_type>6</media_type></project>'; - // $this->assertEqual($expected, $result); - // } +// function testChildFilter() { +// $input = array( +// array( +// 'Project' => array('id' => 1, 'title' => null, 'client_id' => 1, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 1, 'industry_id' => 1, 'modified' => null, 'created' => null), +// 'Style' => array('id' => null, 'name' => null), +// 'JobType' => array('id' => 1, 'name' => 'Touch Screen Kiosk'), +// 'Industry' => array('id' => 1, 'name' => 'Financial'), +// 'BusinessSolution' => array(array('id' => 6, 'name' => 'Convert Sales')), +// 'MediaType' => array( +// array('id' => 15, 'name' => 'Print'), +// array('id' => 7, 'name' => 'Web Demo'), +// array('id' => 6, 'name' => 'CD-ROM') +// ) +// ), +// array( +// 'Project' => array('id' => 2, 'title' => null, 'client_id' => 2, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 2, 'industry_id' => 2, 'modified' => '2007-11-26 14:48:36', 'created' => null), +// 'Style' => array('id' => null, 'name' => null), +// 'JobType' => array('id' => 2, 'name' => 'Awareness Campaign'), +// 'Industry' => array('id' => 2, 'name' => 'Education'), +// 'BusinessSolution' => array( +// array('id' => 4, 'name' => 'Build Relationship'), +// array('id' => 6, 'name' => 'Convert Sales') +// ), +// 'MediaType' => array( +// array('id' => 17, 'name' => 'Web'), +// array('id' => 6, 'name' => 'CD-ROM') +// ) +// ) +// ); +// +// $xml = new Xml($input, array('format' => 'tags', 'tags' => array( +// 'MediaType' => array('value' => 'id', 'children' => false), +// 'JobType' => array('children' => array()), +// 'Industry' => array('children' => array('name')), +// 'show' => false +// ))); +// +// $result = $xml->toString(array('header' => false, 'cdata' => false)); +// $expected = '<project><id>1</id><title /><client_id>1</client_id><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><name>Financial</name></industry><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type>15</media_type><media_type>7</media_type><media_type>6</media_type></project><project><id>2</id><title /><client_id>2</client_id><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><name>Education</name></industry><business_solution><id>4</id><name>Build Relationship</name></business_solution><business_solution><id>6</id><name>Convert Sales</name></business_solution><media_type>17</media_type><media_type>6</media_type></project>'; +// $this->assertEqual($expected, $result); +// } - /* +/* * Broken due to a Set class issue */ - // function testMixedArray() { - // $input = array('OptionGroup' => array( - // array('name' => 'OptA', 'id' => 12, 'OptA 1', 'OptA 2', 'OptA 3', 'OptA 4', 'OptA 5', 'OptA 6'), - // array('name' => 'OptB', 'id' => 12, 'OptB 1', 'OptB 2', 'OptB 3', 'OptB 4', 'OptB 5', 'OptB 6') - // )); - // $expected = '<option_group><name>OptA</name><id>12</id><option_group>OptA 1</option_group><option_group>OptA 2</option_group><option_group>OptA 3</option_group><option_group>OptA 4</option_group><option_group>OptA 5</option_group><option_group>OptA 6</option_group></option_group><option_group><name>OptB</name><id>12</id><option_group>OptB 1</option_group><option_group>OptB 2</option_group><option_group>OptB 3</option_group><option_group>OptB 4</option_group><option_group>OptB 5</option_group><option_group>OptB 6</option_group></option_group>'; - // $xml = new Xml($input, array('format' => 'tags')); - // $result = $xml->toString(array('header' => false, 'cdata' => false)); - // $this->assertEqual($expected, $result); - // } +// function testMixedArray() { +// $input = array('OptionGroup' => array( +// array('name' => 'OptA', 'id' => 12, 'OptA 1', 'OptA 2', 'OptA 3', 'OptA 4', 'OptA 5', 'OptA 6'), +// array('name' => 'OptB', 'id' => 12, 'OptB 1', 'OptB 2', 'OptB 3', 'OptB 4', 'OptB 5', 'OptB 6') +// )); +// $expected = '<option_group><name>OptA</name><id>12</id><option_group>OptA 1</option_group><option_group>OptA 2</option_group><option_group>OptA 3</option_group><option_group>OptA 4</option_group><option_group>OptA 5</option_group><option_group>OptA 6</option_group></option_group><option_group><name>OptB</name><id>12</id><option_group>OptB 1</option_group><option_group>OptB 2</option_group><option_group>OptB 3</option_group><option_group>OptB 4</option_group><option_group>OptB 5</option_group><option_group>OptB 6</option_group></option_group>'; +// $xml = new Xml($input, array('format' => 'tags')); +// $result = $xml->toString(array('header' => false, 'cdata' => false)); +// $this->assertEqual($expected, $result); +// } - // function testMixedNestedArray() { - // $input = array( - // 'OptionA' => array( - // 'name' => 'OptA', - // 'id' => 12, - // 'opt' => array('OptA 1', 'OptA 2', 'OptA 3', 'OptA 4', 'OptA 5', 'OptA 6') - // ), - // 'OptionB' => array( - // 'name' => 'OptB', - // 'id' => 12, - // 'opt' => array('OptB 1', 'OptB 2', 'OptB 3', 'OptB 4', 'OptB 5', 'OptB 6') - // ) - // ); - // $expected = '<option_a><name>OptA</name><id>12</id><opt>OptA 1</opt><opt>OptA 2</opt><opt>OptA 3</opt><opt>OptA 4</opt><opt>OptA 5</opt><opt>OptA 6</opt></option_a><option_b><name>OptB</name><id>12</id><opt>OptB 1</opt><opt>OptB 2</opt><opt>OptB 3</opt><opt>OptB 4</opt><opt>OptB 5</opt><opt>OptB 6</opt></option_b>'; - // $xml = new Xml($input, array('format' => 'tags')); - // $result = $xml->toString(array('header' => false, 'cdata' => false)); - // $this->assertEqual($expected, $result); - // } +// function testMixedNestedArray() { +// $input = array( +// 'OptionA' => array( +// 'name' => 'OptA', +// 'id' => 12, +// 'opt' => array('OptA 1', 'OptA 2', 'OptA 3', 'OptA 4', 'OptA 5', 'OptA 6') +// ), +// 'OptionB' => array( +// 'name' => 'OptB', +// 'id' => 12, +// 'opt' => array('OptB 1', 'OptB 2', 'OptB 3', 'OptB 4', 'OptB 5', 'OptB 6') +// ) +// ); +// $expected = '<option_a><name>OptA</name><id>12</id><opt>OptA 1</opt><opt>OptA 2</opt><opt>OptA 3</opt><opt>OptA 4</opt><opt>OptA 5</opt><opt>OptA 6</opt></option_a><option_b><name>OptB</name><id>12</id><opt>OptB 1</opt><opt>OptB 2</opt><opt>OptB 3</opt><opt>OptB 4</opt><opt>OptB 5</opt><opt>OptB 6</opt></option_b>'; +// $xml = new Xml($input, array('format' => 'tags')); +// $result = $xml->toString(array('header' => false, 'cdata' => false)); +// $this->assertEqual($expected, $result); +// } - // function testMixedArrayAttributes() { - // $input = array('OptionGroup' => array( - // array( - // 'name' => 'OptA', - // 'id' => 12, - // array('opt' => 'OptA 1'), - // array('opt' => 'OptA 2'), - // array('opt' => 'OptA 3'), - // array('opt' => 'OptA 4'), - // array('opt' => 'OptA 5'), - // array('opt' => 'OptA 6') - // ), - // array( - // 'name' => 'OptB', - // 'id' => 12, - // array('opt' => 'OptB 1'), - // array('opt' => 'OptB 2'), - // array('opt' => 'OptB 3'), - // array('opt' => 'OptB 4'), - // array('opt' => 'OptB 5'), - // array('opt' => 'OptB 6') - // ) - // )); - // $expected = '<option_group name="OptA" id="12"><opt>OptA 1</opt><opt>OptA 2</opt><opt>OptA 3</opt><opt>OptA 4</opt><opt>OptA 5</opt><opt>OptA 6</opt></option_group><option_group name="OptB" id="12"><opt>OptB 1</opt><opt>OptB 2</opt><opt>OptB 3</opt><opt>OptB 4</opt><opt>OptB 5</opt><opt>OptB 6</opt></option_group>'; - // - // $options = array('tags' => array('option_group' => array('attributes' => array('id', 'name')))); - // $xml = new Xml($input, $options); - // $result = $xml->toString(false); - // - // $this->assertEqual($expected, $result); - // } +// function testMixedArrayAttributes() { +// $input = array('OptionGroup' => array( +// array( +// 'name' => 'OptA', +// 'id' => 12, +// array('opt' => 'OptA 1'), +// array('opt' => 'OptA 2'), +// array('opt' => 'OptA 3'), +// array('opt' => 'OptA 4'), +// array('opt' => 'OptA 5'), +// array('opt' => 'OptA 6') +// ), +// array( +// 'name' => 'OptB', +// 'id' => 12, +// array('opt' => 'OptB 1'), +// array('opt' => 'OptB 2'), +// array('opt' => 'OptB 3'), +// array('opt' => 'OptB 4'), +// array('opt' => 'OptB 5'), +// array('opt' => 'OptB 6') +// ) +// )); +// $expected = '<option_group name="OptA" id="12"><opt>OptA 1</opt><opt>OptA 2</opt><opt>OptA 3</opt><opt>OptA 4</opt><opt>OptA 5</opt><opt>OptA 6</opt></option_group><option_group name="OptB" id="12"><opt>OptB 1</opt><opt>OptB 2</opt><opt>OptB 3</opt><opt>OptB 4</opt><opt>OptB 5</opt><opt>OptB 6</opt></option_group>'; +// +// $options = array('tags' => array('option_group' => array('attributes' => array('id', 'name')))); +// $xml = new Xml($input, $options); +// $result = $xml->toString(false); +// +// $this->assertEqual($expected, $result); +// } - /* +/* * Not implemented yet */ - // function testTagMap() { - // $input = array( - // array( - // 'Project' => array('id' => 1, 'title' => null, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 1, 'industry_id' => 1, 'modified' => null, 'created' => null), - // 'Style' => array('id' => null, 'name' => null), - // 'JobType' => array('id' => 1, 'name' => 'Touch Screen Kiosk'), - // 'Industry' => array('id' => 1, 'name' => 'Financial') - // ), - // array( - // 'Project' => array('id' => 2, 'title' => null, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 2, 'industry_id' => 2, 'modified' => '2007-11-26 14:48:36', 'created' => null), - // 'Style' => array('id' => null, 'name' => null), - // 'JobType' => array('id' => 2, 'name' => 'Awareness Campaign'), - // 'Industry' => array('id' => 2, 'name' => 'Education'), - // ) - // ); - // $expected = '<project id="1"><title /><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style id=""><name /></style><jobtype id="1">Touch Screen Kiosk</jobtype><industry id="1"><name>Financial</name></industry></project><project id="2"><title /><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style id=""><name /></style><jobtype id="2">Awareness Campaign</jobtype><industry id="2"><name>Education</name></industry></project>'; - // - // $xml = new Xml($input, array('tags' => array( - // 'Project' => array('attributes' => array('id')), - // 'style' => array('attributes' => array('id')), - // 'JobType' => array('name' => 'jobtype', 'attributes' => array('id'), 'value' => 'name'), - // 'Industry' => array('attributes' => array('id')) - // ))); - // $result = $xml->toString(array('header' => false, 'cdata' => false)); - // $this->assertEqual($expected, $result); - // } +// function testTagMap() { +// $input = array( +// array( +// 'Project' => array('id' => 1, 'title' => null, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 1, 'industry_id' => 1, 'modified' => null, 'created' => null), +// 'Style' => array('id' => null, 'name' => null), +// 'JobType' => array('id' => 1, 'name' => 'Touch Screen Kiosk'), +// 'Industry' => array('id' => 1, 'name' => 'Financial') +// ), +// array( +// 'Project' => array('id' => 2, 'title' => null, 'show' => 1, 'is_spotlight' => null, 'style_id' => 0, 'job_type_id' => 2, 'industry_id' => 2, 'modified' => '2007-11-26 14:48:36', 'created' => null), +// 'Style' => array('id' => null, 'name' => null), +// 'JobType' => array('id' => 2, 'name' => 'Awareness Campaign'), +// 'Industry' => array('id' => 2, 'name' => 'Education'), +// ) +// ); +// $expected = '<project id="1"><title /><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style id=""><name /></style><jobtype id="1">Touch Screen Kiosk</jobtype><industry id="1"><name>Financial</name></industry></project><project id="2"><title /><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style id=""><name /></style><jobtype id="2">Awareness Campaign</jobtype><industry id="2"><name>Education</name></industry></project>'; +// +// $xml = new Xml($input, array('tags' => array( +// 'Project' => array('attributes' => array('id')), +// 'style' => array('attributes' => array('id')), +// 'JobType' => array('name' => 'jobtype', 'attributes' => array('id'), 'value' => 'name'), +// 'Industry' => array('attributes' => array('id')) +// ))); +// $result = $xml->toString(array('header' => false, 'cdata' => false)); +// $this->assertEqual($expected, $result); +// } /** * testAllCData method - * + * * @access public * @return void */ @@ -391,26 +391,26 @@ class XmlTest extends UnitTestCase { 'Industry' => array('id' => 2, 'name' => 'Education'), ) ); - $expected = '<project><id>1</id><title /><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1.89</job_type_id><industry_id>1.56</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name><![CDATA[Touch Screen Kiosk]]></name></job_type><industry><id>1</id><name><![CDATA[Financial]]></name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2.2</job_type_id><industry_id>2.2</industry_id><modified><![CDATA[2007-11-26 14:48:36]]></modified><created /><style><id /><name /></style><job_type><id>2</id><name><![CDATA[Awareness Campaign]]></name></job_type><industry><id>2</id><name><![CDATA[Education]]></name></industry></project>'; + $expected = '<project><id>1</id><title/><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1.89</job_type_id><industry_id>1.56</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name><![CDATA[Touch Screen Kiosk]]></name></job_type><industry><id>1</id><name><![CDATA[Financial]]></name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2.2</job_type_id><industry_id>2.2</industry_id><modified><![CDATA[2007-11-26 14:48:36]]></modified><created /><style><id /><name /></style><job_type><id>2</id><name><![CDATA[Awareness Campaign]]></name></job_type><industry><id>2</id><name><![CDATA[Education]]></name></industry></project>'; $xml = new Xml($input, array('format' => 'tags')); $result = $xml->toString(array('header' => false, 'cdata' => true)); $this->assertEqual($expected, $result); } - /* +/* * PHP-native Unicode support pending */ - // function testConvertEntities() { - // $input = array('project' => 'écît'); - // $xml = new Xml($input); - // - // $result = $xml->toString(array('header' => false, 'cdata' => false, 'convertEntities' => true)); - // $expected = '<project>écît</project>'; - // $this->assertEqual($result, $expected); - // } +// function testConvertEntities() { +// $input = array('project' => 'écît'); +// $xml = new Xml($input); +// +// $result = $xml->toString(array('header' => false, 'cdata' => false, 'convertEntities' => true)); +// $expected = '<project>écît</project>'; +// $this->assertEqual($result, $expected); +// } /** * testWhitespace method - * + * * @access public * @return void */ @@ -429,15 +429,15 @@ class XmlTest extends UnitTestCase { 'Industry' => array('id' => 2, 'name' => 'Education'), ) ); - $expected = "\n\t<project>\n\t\t<id>\n\t\t\t1\n\t\t</id>\n\t\t<title />\n\t\t<client_id>\n\t\t\t1\n\t\t</client_id>\n\t\t<show>\n\t\t\t1\n\t\t</show>\n\t\t<is_spotlight />\n\t\t<style_id>\n\t\t\t0\n\t\t</style_id>\n\t\t<job_type_id>\n\t\t\t1\n\t\t</job_type_id>\n\t\t<industry_id>\n\t\t\t1\n\t\t</industry_id>\n\t\t<modified />\n\t\t<created />\n\t\t<style>\n\t\t\t<id />\n\t\t\t<name />\n\t\t</style>\n\t\t<job_type>\n\t\t\t<id>\n\t\t\t\t1\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tTouch Screen Kiosk\n\t\t\t</name>\n\t\t</job_type>\n\t\t<industry>\n\t\t\t<id>\n\t\t\t\t1\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tFinancial\n\t\t\t</name>\n\t\t</industry>\n\t</project>\n\t<project>\n\t\t<id>\n\t\t\t2\n\t\t</id>\n\t\t<title />\n\t\t<client_id>\n\t\t\t2\n\t\t</client_id>\n\t\t<show>\n\t\t\t1\n\t\t</show>\n\t\t<is_spotlight />\n\t\t<style_id>\n\t\t\t0\n\t\t</style_id>\n\t\t<job_type_id>\n\t\t\t2\n\t\t</job_type_id>\n\t\t<industry_id>\n\t\t\t2\n\t\t</industry_id>\n\t\t<modified>\n\t\t\t2007-11-26 14:48:36\n\t\t</modified>\n\t\t<created />\n\t\t<style>\n\t\t\t<id />\n\t\t\t<name />\n\t\t</style>\n\t\t<job_type>\n\t\t\t<id>\n\t\t\t\t2\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tAwareness Campaign\n\t\t\t</name>\n\t\t</job_type>\n\t\t<industry>\n\t\t\t<id>\n\t\t\t\t2\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tEducation\n\t\t\t</name>\n\t\t</industry>\n\t</project>\n"; - + $expected = "\n\t<project>\n\t\t<id>\n\t\t\t1\n\t\t</id>\n\t\t<title/>\n\t\t<client_id>\n\t\t\t1\n\t\t</client_id>\n\t\t<show>\n\t\t\t1\n\t\t</show>\n\t\t<is_spotlight />\n\t\t<style_id>\n\t\t\t0\n\t\t</style_id>\n\t\t<job_type_id>\n\t\t\t1\n\t\t</job_type_id>\n\t\t<industry_id>\n\t\t\t1\n\t\t</industry_id>\n\t\t<modified />\n\t\t<created />\n\t\t<style>\n\t\t\t<id />\n\t\t\t<name />\n\t\t</style>\n\t\t<job_type>\n\t\t\t<id>\n\t\t\t\t1\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tTouch Screen Kiosk\n\t\t\t</name>\n\t\t</job_type>\n\t\t<industry>\n\t\t\t<id>\n\t\t\t\t1\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tFinancial\n\t\t\t</name>\n\t\t</industry>\n\t</project>\n\t<project>\n\t\t<id>\n\t\t\t2\n\t\t</id>\n\t\t<title />\n\t\t<client_id>\n\t\t\t2\n\t\t</client_id>\n\t\t<show>\n\t\t\t1\n\t\t</show>\n\t\t<is_spotlight />\n\t\t<style_id>\n\t\t\t0\n\t\t</style_id>\n\t\t<job_type_id>\n\t\t\t2\n\t\t</job_type_id>\n\t\t<industry_id>\n\t\t\t2\n\t\t</industry_id>\n\t\t<modified>\n\t\t\t2007-11-26 14:48:36\n\t\t</modified>\n\t\t<created />\n\t\t<style>\n\t\t\t<id />\n\t\t\t<name />\n\t\t</style>\n\t\t<job_type>\n\t\t\t<id>\n\t\t\t\t2\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tAwareness Campaign\n\t\t\t</name>\n\t\t</job_type>\n\t\t<industry>\n\t\t\t<id>\n\t\t\t\t2\n\t\t\t</id>\n\t\t\t<name>\n\t\t\t\tEducation\n\t\t\t</name>\n\t\t</industry>\n\t</project>\n"; + $xml = new Xml($input, array('format' => 'tags')); $result = $xml->toString(array('header' => false, 'cdata' => false, 'whitespace' => true)); $this->assertEqual($expected, $result); } /** * testSetSerialization method - * + * * @access public * @return void */ @@ -456,34 +456,54 @@ class XmlTest extends UnitTestCase { 'Industry' => array('id' => 2, 'name' => 'Education'), ) ); - $expected = '<project><id>1</id><title /><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry></project>'; - + $expected = '<project><id>1</id><title/><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry></project>'; + $xml = new Xml(Set::map($input), array('format' => 'tags')); $result = $xml->toString(array('header' => false, 'cdata' => false)); $this->assertEqual($expected, $result); } - +/** + * testSimpleParsing method + * + * @access public + * @return void + */ function testSimpleParsing() { $source = '<response><hello><![CDATA[happy world]]></hello><goodbye><![CDATA[cruel world]]></goodbye></response>'; $xml = new Xml($source); $result = $xml->toString(); $this->assertEqual($source, $result); } - +/** + * testMixedParsing method + * + * @access public + * @return void + */ function testMixedParsing() { $source = '<response><body><hello><![CDATA[happy world]]></hello><![CDATA[in between]]><goodbye><![CDATA[cruel world]]></goodbye></body></response>'; $xml = new Xml($source); $result = $xml->toString(); $this->assertEqual($source, $result); } - +/** + * testComplexParsing method + * + * @access public + * @return void + */ function testComplexParsing() { - $source = '<projects><project><id>1</id><title /><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry></project></projects>'; + $source = '<projects><project><id>1</id><title/><client_id>1</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>1</job_type_id><industry_id>1</industry_id><modified /><created /><style><id /><name /></style><job_type><id>1</id><name>Touch Screen Kiosk</name></job_type><industry><id>1</id><name>Financial</name></industry></project><project><id>2</id><title /><client_id>2</client_id><show>1</show><is_spotlight /><style_id>0</style_id><job_type_id>2</job_type_id><industry_id>2</industry_id><modified>2007-11-26 14:48:36</modified><created /><style><id /><name /></style><job_type><id>2</id><name>Awareness Campaign</name></job_type><industry><id>2</id><name>Education</name></industry></project></projects>'; $xml = new Xml($source); $result = $xml->toString(array('cdata' => false)); $this->assertEqual($source, $result); } - +/** + * testNamespaceParsing method + * + * @access public + * @return void + */ function testNamespaceParsing() { $source = '<a:container xmlns:a="http://example.com/a" xmlns:b="http://example.com/b" xmlns:c="http://example.com/c" xmlns:d="http://example.com/d" xmlns:e="http://example.com/e"><b:rule test=""><c:result>value</c:result></b:rule><d:rule test=""><e:result>value</e:result></d:rule></a:container>'; $xml = new Xml($source); @@ -493,11 +513,16 @@ class XmlTest extends UnitTestCase { $children = $xml->children('container'); $this->assertEqual($children[0]->namespace, 'a'); - + $children = $children[0]->children('rule'); $this->assertEqual($children[0]->namespace, 'b'); } - +/** + * testNamespaces method + * + * @access public + * @return void + */ function testNamespaces() { $source = '<a:container xmlns:a="http://example.com/a" xmlns:b="http://example.com/b" xmlns:c="http://example.com/c" xmlns:d="http://example.com/d" xmlns:e="http://example.com/e"><b:rule test=""><c:result>value</c:result></b:rule><d:rule test=""><e:result>value</e:result></d:rule></a:container>'; $xml = new Xml($source); @@ -509,8 +534,8 @@ class XmlTest extends UnitTestCase { $result = $xml->toString(array('cdata' => false)); $this->assertEqual($expects, $result); } - - /* + +/* * @todo Add test for default namespaces */ diff --git a/cake/tests/fixtures/aco_action_fixture.php b/cake/tests/fixtures/aco_action_fixture.php index 9b44a6994..e879d1128 100644 --- a/cake/tests/fixtures/aco_action_fixture.php +++ b/cake/tests/fixtures/aco_action_fixture.php @@ -55,6 +55,12 @@ class AcoActionFixture extends CakeTestFixture { 'lft' => array('type' => 'integer', 'length' => 10, 'null' => true), 'rght' => array('type' => 'integer', 'length' => 10, 'null' => true) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array(); } diff --git a/cake/tests/fixtures/ad_fixture.php b/cake/tests/fixtures/ad_fixture.php index 8d6d85067..ccd15ca33 100644 --- a/cake/tests/fixtures/ad_fixture.php +++ b/cake/tests/fixtures/ad_fixture.php @@ -30,8 +30,14 @@ * @subpackage cake.tests.fixtures */ class AdFixture extends CakeTestFixture { +/** + * name property + * + * @var string 'Ad' + * @access public + */ var $name = 'Ad'; - /** +/** * fields property * * @var array @@ -45,7 +51,7 @@ class AdFixture extends CakeTestFixture { 'rght' => array('type' => 'integer'), 'name' => array('type' => 'string', 'length' => 255, 'null' => false), ); - /** +/** * records property * * @var array @@ -60,6 +66,5 @@ class AdFixture extends CakeTestFixture { array( 'id' => 6, 'parent_id' => NULL, 'lft' => 10, 'rght' => 11, 'campaign_id' => 2, 'name' => 'Alborg' ), array( 'id' => 7, 'parent_id' => NULL, 'lft' => 13, 'rght' => 14, 'campaign_id' => 3, 'name' => 'New York' ), ); - } ?> diff --git a/cake/tests/fixtures/advertisement_fixture.php b/cake/tests/fixtures/advertisement_fixture.php index 8dc5aa68a..a756ba3da 100644 --- a/cake/tests/fixtures/advertisement_fixture.php +++ b/cake/tests/fixtures/advertisement_fixture.php @@ -52,6 +52,12 @@ class AdvertisementFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('title' => 'First Ad', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('title' => 'Second Ad', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31') diff --git a/cake/tests/fixtures/another_article_fixture.php b/cake/tests/fixtures/another_article_fixture.php index 9bda5add2..cdfb47950 100644 --- a/cake/tests/fixtures/another_article_fixture.php +++ b/cake/tests/fixtures/another_article_fixture.php @@ -52,6 +52,12 @@ class AnotherArticleFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('title' => 'First Article', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('title' => 'Second Article', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/apple_fixture.php b/cake/tests/fixtures/apple_fixture.php index fa5c8cfc6..d219c24cf 100644 --- a/cake/tests/fixtures/apple_fixture.php +++ b/cake/tests/fixtures/apple_fixture.php @@ -35,14 +35,14 @@ class AppleFixture extends CakeTestFixture { /** * name property - * + * * @var string 'Apple' * @access public */ var $name = 'Apple'; /** * fields property - * + * * @var array * @access public */ @@ -56,6 +56,12 @@ class AppleFixture extends CakeTestFixture { 'modified' => 'datetime', 'mytime' => 'time' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('apple_id' => 2, 'color' => 'Red 1', 'name' => 'Red Apple 1', 'created' => '2006-11-22 10:38:58', 'date' => '1951-01-04', 'modified' => '2006-12-01 13:31:26', 'mytime' => '22:57:17'), array('apple_id' => 1, 'color' => 'Bright Red 1', 'name' => 'Bright Red Apple', 'created' => '2006-11-22 10:43:13', 'date' => '2014-01-01', 'modified' => '2006-11-30 18:38:10', 'mytime' => '22:57:17'), diff --git a/cake/tests/fixtures/aro_fixture.php b/cake/tests/fixtures/aro_fixture.php index a1d5ba1f8..0764264d7 100644 --- a/cake/tests/fixtures/aro_fixture.php +++ b/cake/tests/fixtures/aro_fixture.php @@ -55,7 +55,12 @@ class AroFixture extends CakeTestFixture { 'lft' => array('type' => 'integer', 'length' => 10, 'null' => true), 'rght' => array('type' => 'integer', 'length' => 10, 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 8), array('parent_id' => '1', 'model' => 'Group', 'foreign_key' => '1', 'alias' => 'admins', 'lft' => 2, 'rght' => 7), diff --git a/cake/tests/fixtures/aros_aco_fixture.php b/cake/tests/fixtures/aros_aco_fixture.php index 1a8b69772..68a874fa8 100644 --- a/cake/tests/fixtures/aros_aco_fixture.php +++ b/cake/tests/fixtures/aros_aco_fixture.php @@ -55,6 +55,12 @@ class ArosAcoFixture extends CakeTestFixture { '_update' => array('type' => 'string', 'length' => 2, 'default' => 0), '_delete' => array('type' => 'string', 'length' => 2, 'default' => 0) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array(); } diff --git a/cake/tests/fixtures/aros_aco_two_fixture.php b/cake/tests/fixtures/aros_aco_two_fixture.php index 6539ff760..125cdeda0 100644 --- a/cake/tests/fixtures/aros_aco_two_fixture.php +++ b/cake/tests/fixtures/aros_aco_two_fixture.php @@ -35,14 +35,14 @@ class ArosAcoTwoFixture extends CakeTestFixture { /** * name property - * + * * @var string 'ArosAcoTwo' * @access public */ var $name = 'ArosAcoTwo'; /** * fields property - * + * * @var array * @access public */ @@ -57,17 +57,17 @@ class ArosAcoTwoFixture extends CakeTestFixture { ); /** * records property - * + * * @var array * @access public */ var $records = array( - array('id' => 1, 'aro_id' => '1', 'aco_id' => '1', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('id' => 1, 'aro_id' => '1', 'aco_id' => '1', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), array('id' => 2, 'aro_id' => '2', 'aco_id' => '1', '_create' => '0', '_read' => '1', '_update' => '1', '_delete' => '1'), array('id' => 3, 'aro_id' => '3', 'aco_id' => '2', '_create' => '0', '_read' => '1', '_update' => '0', '_delete' => '0'), array('id' => 4, 'aro_id' => '4', 'aco_id' => '2', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '-1'), - array('id' => 5, 'aro_id' => '4', 'aco_id' => '6', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '0'), - array('id' => 6, 'aro_id' => '5', 'aco_id' => '1', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), + array('id' => 5, 'aro_id' => '4', 'aco_id' => '6', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '0'), + array('id' => 6, 'aro_id' => '5', 'aco_id' => '1', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), array('id' => 7, 'aro_id' => '6', 'aco_id' => '3', '_create' => '-1', '_read' => '1', '_update' => '-1', '_delete' => '-1'), array('id' => 8, 'aro_id' => '6', 'aco_id' => '4', '_create' => '-1', '_read' => '1', '_update' => '-1', '_delete' => '1'), array('id' => 9, 'aro_id' => '6', 'aco_id' => '6', '_create' => '-1', '_read' => '1', '_update' => '1', '_delete' => '-1'), @@ -75,13 +75,13 @@ class ArosAcoTwoFixture extends CakeTestFixture { array('id' => 11, 'aro_id' => '7', 'aco_id' => '7', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '0'), array('id' => 12, 'aro_id' => '7', 'aco_id' => '8', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '0'), array('id' => 13, 'aro_id' => '7', 'aco_id' => '9', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('id' => 14, 'aro_id' => '7', 'aco_id' => '10', '_create' => '0', '_read' => '0', '_update' => '0', '_delete' => '1'), + array('id' => 14, 'aro_id' => '7', 'aco_id' => '10', '_create' => '0', '_read' => '0', '_update' => '0', '_delete' => '1'), array('id' => 15, 'aro_id' => '8', 'aco_id' => '10', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('id' => 16, 'aro_id' => '8', 'aco_id' => '2', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('id' => 16, 'aro_id' => '8', 'aco_id' => '2', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), array('id' => 17, 'aro_id' => '9', 'aco_id' => '4', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '-1'), - array('id' => 18, 'aro_id' => '9', 'aco_id' => '9', '_create' => '0', '_read' => '0', '_update' => '1', '_delete' => '1'), + array('id' => 18, 'aro_id' => '9', 'aco_id' => '9', '_create' => '0', '_read' => '0', '_update' => '1', '_delete' => '1'), array('id' => 19, 'aro_id' => '10', 'aco_id' => '9', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('id' => 20, 'aro_id' => '10', 'aco_id' => '10', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('id' => 20, 'aro_id' => '10', 'aco_id' => '10', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), ); } diff --git a/cake/tests/fixtures/article_featured_fixture.php b/cake/tests/fixtures/article_featured_fixture.php index aedae4d9f..1712666d8 100644 --- a/cake/tests/fixtures/article_featured_fixture.php +++ b/cake/tests/fixtures/article_featured_fixture.php @@ -55,6 +55,12 @@ class ArticleFeaturedFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('user_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('user_id' => 3, 'title' => 'Second Article', 'body' => 'Second Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/article_fixture.php b/cake/tests/fixtures/article_fixture.php index 0db446961..a4ed03c2e 100644 --- a/cake/tests/fixtures/article_fixture.php +++ b/cake/tests/fixtures/article_fixture.php @@ -55,6 +55,12 @@ class ArticleFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('user_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('user_id' => 3, 'title' => 'Second Article', 'body' => 'Second Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/articles_tag_fixture.php b/cake/tests/fixtures/articles_tag_fixture.php index da15c2a64..5889b0e13 100644 --- a/cake/tests/fixtures/articles_tag_fixture.php +++ b/cake/tests/fixtures/articles_tag_fixture.php @@ -51,6 +51,12 @@ class ArticlesTagFixture extends CakeTestFixture { 'tag_id' => array('type' => 'integer', 'null' => false), 'indexes' => array('UNIQUE_TAG' => array('column'=> array('article_id', 'tag_id'), 'unique'=>1)) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('article_id' => 1, 'tag_id' => 1), array('article_id' => 1, 'tag_id' => 2), diff --git a/cake/tests/fixtures/attachment_fixture.php b/cake/tests/fixtures/attachment_fixture.php index c41c56d7a..eee2fca72 100644 --- a/cake/tests/fixtures/attachment_fixture.php +++ b/cake/tests/fixtures/attachment_fixture.php @@ -53,6 +53,12 @@ class AttachmentFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('comment_id' => 5, 'attachment' => 'attachment.zip', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31') ); diff --git a/cake/tests/fixtures/auth_user_fixture.php b/cake/tests/fixtures/auth_user_fixture.php index a2a976d3f..92cbd21df 100644 --- a/cake/tests/fixtures/auth_user_fixture.php +++ b/cake/tests/fixtures/auth_user_fixture.php @@ -53,6 +53,12 @@ class AuthUserFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('username' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), array('username' => 'nate', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31'), diff --git a/cake/tests/fixtures/author_fixture.php b/cake/tests/fixtures/author_fixture.php index 6f34b63d8..5c8a398c9 100644 --- a/cake/tests/fixtures/author_fixture.php +++ b/cake/tests/fixtures/author_fixture.php @@ -53,6 +53,12 @@ class AuthorFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), array('user' => 'nate', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31'), diff --git a/cake/tests/fixtures/bid_fixture.php b/cake/tests/fixtures/bid_fixture.php index 8dbb37fa9..0e295c5ba 100644 --- a/cake/tests/fixtures/bid_fixture.php +++ b/cake/tests/fixtures/bid_fixture.php @@ -51,6 +51,12 @@ class BidFixture extends CakeTestFixture { 'message_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('message_id' => 1, 'name' => 'Bid 1.1'), array('message_id' => 1, 'name' => 'Bid 1.2'), diff --git a/cake/tests/fixtures/callback_fixture.php b/cake/tests/fixtures/callback_fixture.php index 448d4e923..c5daa1fae 100644 --- a/cake/tests/fixtures/callback_fixture.php +++ b/cake/tests/fixtures/callback_fixture.php @@ -35,14 +35,14 @@ class CallbackFixture extends CakeTestFixture { /** * name property - * + * * @var string 'Callback' * @access public */ var $name = 'Callback'; /** * fields property - * + * * @var array * @access public */ @@ -53,6 +53,12 @@ class CallbackFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('user' => 'user1', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31'), array('user' => 'user2', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:20:23', 'updated' => '2007-03-17 01:22:31'), diff --git a/cake/tests/fixtures/campaign_fixture.php b/cake/tests/fixtures/campaign_fixture.php index f46b3d688..3e92a4c8c 100644 --- a/cake/tests/fixtures/campaign_fixture.php +++ b/cake/tests/fixtures/campaign_fixture.php @@ -30,8 +30,14 @@ * @subpackage cake.tests.fixtures */ class CampaignFixture extends CakeTestFixture { +/** + * name property + * + * @var string 'Campaign' + * @access public + */ var $name = 'Campaign'; - /** +/** * fields property * * @var array @@ -41,7 +47,12 @@ class CampaignFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'length' => 255, 'null' => false), ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array( 'id' => 1 , 'name' => 'Hurtigruten' ), array( 'id' => 2 , 'name' => 'Colorline' ), diff --git a/cake/tests/fixtures/category_fixture.php b/cake/tests/fixtures/category_fixture.php index 1232681fa..9f826373b 100644 --- a/cake/tests/fixtures/category_fixture.php +++ b/cake/tests/fixtures/category_fixture.php @@ -53,6 +53,12 @@ class CategoryFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), array('parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), diff --git a/cake/tests/fixtures/category_thread_fixture.php b/cake/tests/fixtures/category_thread_fixture.php index 70822eee6..f5ef21f0a 100644 --- a/cake/tests/fixtures/category_thread_fixture.php +++ b/cake/tests/fixtures/category_thread_fixture.php @@ -53,6 +53,12 @@ class CategoryThreadFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), array('parent_id' => 1, 'name' => 'Category 1.1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), diff --git a/cake/tests/fixtures/comment_fixture.php b/cake/tests/fixtures/comment_fixture.php index bc2bffc73..75a5794db 100644 --- a/cake/tests/fixtures/comment_fixture.php +++ b/cake/tests/fixtures/comment_fixture.php @@ -55,6 +55,12 @@ class CommentFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('id' => 1, 'article_id' => 1, 'user_id' => 2, 'comment' => 'First Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:45:23', 'updated' => '2007-03-18 10:47:31'), array('id' => 2, 'article_id' => 1, 'user_id' => 4, 'comment' => 'Second Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31'), diff --git a/cake/tests/fixtures/data_test_fixture.php b/cake/tests/fixtures/data_test_fixture.php index bd6ed3dc0..282c2d717 100644 --- a/cake/tests/fixtures/data_test_fixture.php +++ b/cake/tests/fixtures/data_test_fixture.php @@ -54,6 +54,12 @@ class DataTestFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'default' => null), 'updated' => array('type' => 'datetime', 'default' => null) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array(); } diff --git a/cake/tests/fixtures/datatype_fixture.php b/cake/tests/fixtures/datatype_fixture.php index f72c38716..1a7e3315b 100644 --- a/cake/tests/fixtures/datatype_fixture.php +++ b/cake/tests/fixtures/datatype_fixture.php @@ -50,7 +50,12 @@ class DatatypeFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'null'=> false, 'default'=> 0, 'key' => 'primary'), 'float_field' => array('type' => 'float', 'length' => '5,2', 'null' => false, 'default' => null), ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('id' => 1, 'float_field' => 42.23), ); diff --git a/cake/tests/fixtures/dependency_fixture.php b/cake/tests/fixtures/dependency_fixture.php index 6d20a9cf0..72dc5d7a7 100644 --- a/cake/tests/fixtures/dependency_fixture.php +++ b/cake/tests/fixtures/dependency_fixture.php @@ -20,7 +20,7 @@ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project * @package cake.tests * @subpackage cake.tests.fixtures - * @since CakePHP(tm) v 1.2.0.6879 //Correct version number as needed** + * @since CakePHP(tm) v 1.2.0.6879//Correct version number as needed** * @version $Revision$ * @modifiedby $LastChangedBy$ * @lastmodified $Date$ @@ -33,19 +33,19 @@ * * @package cake.tests * @subpackage cake.tests.fixtures - * @since CakePHP(tm) v 1.2.0.6879 //Correct version number as needed** + * @since CakePHP(tm) v 1.2.0.6879//Correct version number as needed** */ class DependencyFixture extends CakeTestFixture { /** * name property - * + * * @var string 'Dependency' * @access public */ var $name = 'Dependency'; /** * fields property - * + * * @var array * @access public */ @@ -53,6 +53,12 @@ class DependencyFixture extends CakeTestFixture { 'child_id' => 'integer', 'parent_id' => 'integer' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('child_id' => 1, 'parent_id' => 2), ); diff --git a/cake/tests/fixtures/device_fixture.php b/cake/tests/fixtures/device_fixture.php index 70c2527ee..dcf0d83db 100644 --- a/cake/tests/fixtures/device_fixture.php +++ b/cake/tests/fixtures/device_fixture.php @@ -52,6 +52,12 @@ class DeviceFixture extends CakeTestFixture { 'name' => array('type' => 'string', 'null' => false), 'typ' => array('type' => 'integer', 'null' => false), ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('device_type_id' => 1, 'name' => 'Device 1', 'typ' => 1), array('device_type_id' => 1, 'name' => 'Device 2', 'typ' => 1), diff --git a/cake/tests/fixtures/device_type_category_fixture.php b/cake/tests/fixtures/device_type_category_fixture.php index 736497edf..b11b9efac 100644 --- a/cake/tests/fixtures/device_type_category_fixture.php +++ b/cake/tests/fixtures/device_type_category_fixture.php @@ -50,6 +50,12 @@ class DeviceTypeCategoryFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'DeviceTypeCategory 1') ); diff --git a/cake/tests/fixtures/device_type_fixture.php b/cake/tests/fixtures/device_type_fixture.php index b1163d63c..44195b459 100644 --- a/cake/tests/fixtures/device_type_fixture.php +++ b/cake/tests/fixtures/device_type_fixture.php @@ -57,6 +57,12 @@ class DeviceTypeFixture extends CakeTestFixture { 'name' => array('type' => 'string', 'null' => false), 'order' => array('type' => 'integer', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('device_type_category_id' => 1, 'feature_set_id' => 1, 'exterior_type_category_id' => 1, 'image_id' => 1, 'extra1_id' => 1, 'extra2_id' => 1, 'name' => 'DeviceType 1', 'order' => 0) ); diff --git a/cake/tests/fixtures/document_directory_fixture.php b/cake/tests/fixtures/document_directory_fixture.php index 9c4275e28..6ffdfec2c 100644 --- a/cake/tests/fixtures/document_directory_fixture.php +++ b/cake/tests/fixtures/document_directory_fixture.php @@ -35,14 +35,14 @@ class DocumentDirectoryFixture extends CakeTestFixture { /** * name property - * + * * @var string 'DocumentDirectory' * @access public */ var $name = 'DocumentDirectory'; /** * fields property - * + * * @var array * @access public */ @@ -50,6 +50,12 @@ class DocumentDirectoryFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'DocumentDirectory 1') ); diff --git a/cake/tests/fixtures/document_fixture.php b/cake/tests/fixtures/document_fixture.php index 7797c13f5..ca908cb92 100644 --- a/cake/tests/fixtures/document_fixture.php +++ b/cake/tests/fixtures/document_fixture.php @@ -51,6 +51,12 @@ class DocumentFixture extends CakeTestFixture { 'document_directory_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('document_directory_id' => 1, 'name' => 'Document 1') ); diff --git a/cake/tests/fixtures/exterior_type_category_fixture.php b/cake/tests/fixtures/exterior_type_category_fixture.php index 6379c53a0..a6dfb4eb4 100644 --- a/cake/tests/fixtures/exterior_type_category_fixture.php +++ b/cake/tests/fixtures/exterior_type_category_fixture.php @@ -51,6 +51,12 @@ class ExteriorTypeCategoryFixture extends CakeTestFixture { 'image_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('image_id' => 1, 'name' => 'ExteriorTypeCategory 1') ); diff --git a/cake/tests/fixtures/feature_set_fixture.php b/cake/tests/fixtures/feature_set_fixture.php index a1502986f..cefe658d5 100644 --- a/cake/tests/fixtures/feature_set_fixture.php +++ b/cake/tests/fixtures/feature_set_fixture.php @@ -50,6 +50,12 @@ class FeatureSetFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'FeatureSet 1') ); diff --git a/cake/tests/fixtures/featured_fixture.php b/cake/tests/fixtures/featured_fixture.php index 4089dd65d..14d04e907 100644 --- a/cake/tests/fixtures/featured_fixture.php +++ b/cake/tests/fixtures/featured_fixture.php @@ -55,6 +55,12 @@ class FeaturedFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('article_featured_id' => 1, 'category_id' => 1, 'published_date' => '2007-03-31 10:39:23', 'end_date' => '2007-05-15 10:39:23', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('article_featured_id' => 2, 'category_id' => 1, 'published_date' => '2007-03-31 10:39:23', 'end_date' => '2007-05-15 10:39:23', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/cake/tests/fixtures/home_fixture.php b/cake/tests/fixtures/home_fixture.php index 8de19dc51..d34f30090 100644 --- a/cake/tests/fixtures/home_fixture.php +++ b/cake/tests/fixtures/home_fixture.php @@ -35,14 +35,14 @@ class HomeFixture extends CakeTestFixture { /** * name property - * + * * @var string 'Home' * @access public */ var $name = 'Home'; /** * fields property - * + * * @var array * @access public */ @@ -54,6 +54,12 @@ class HomeFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('another_article_id' => 1, 'advertisement_id' => 1, 'title' => 'First Home', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('another_article_id' => 3, 'advertisement_id' => 1, 'title' => 'Second Home', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31') diff --git a/cake/tests/fixtures/image_fixture.php b/cake/tests/fixtures/image_fixture.php index 53d15d37c..d3dab56e0 100644 --- a/cake/tests/fixtures/image_fixture.php +++ b/cake/tests/fixtures/image_fixture.php @@ -50,6 +50,12 @@ class ImageFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'Image 1'), array('name' => 'Image 2'), diff --git a/cake/tests/fixtures/item_fixture.php b/cake/tests/fixtures/item_fixture.php index a95f3cdb8..40c05ef36 100644 --- a/cake/tests/fixtures/item_fixture.php +++ b/cake/tests/fixtures/item_fixture.php @@ -52,6 +52,12 @@ class ItemFixture extends CakeTestFixture { 'published' => array('type' => 'boolean', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('syfile_id' => 1, 'published' => 0, 'name' => 'Item 1'), array('syfile_id' => 2, 'published' => 0, 'name' => 'Item 2'), diff --git a/cake/tests/fixtures/items_portfolio_fixture.php b/cake/tests/fixtures/items_portfolio_fixture.php index e3c7b257a..66e64a594 100644 --- a/cake/tests/fixtures/items_portfolio_fixture.php +++ b/cake/tests/fixtures/items_portfolio_fixture.php @@ -51,6 +51,12 @@ class ItemsPortfolioFixture extends CakeTestFixture { 'item_id' => array('type' => 'integer', 'null' => false), 'portfolio_id' => array('type' => 'integer', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('item_id' => 1, 'portfolio_id' => 1), array('item_id' => 2, 'portfolio_id' => 2), diff --git a/cake/tests/fixtures/join_a_b_fixture.php b/cake/tests/fixtures/join_a_b_fixture.php index e72ef7890..38a90d41c 100644 --- a/cake/tests/fixtures/join_a_b_fixture.php +++ b/cake/tests/fixtures/join_a_b_fixture.php @@ -54,7 +54,12 @@ class JoinABFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('join_a_id' => 1, 'join_b_id' => 2, 'other' => 'Data for Join A 1 Join B 2', 'created' => '2008-01-03 10:56:33', 'updated' => '2008-01-03 10:56:33'), array('join_a_id' => 2, 'join_b_id' => 3, 'other' => 'Data for Join A 2 Join B 3', 'created' => '2008-01-03 10:56:34', 'updated' => '2008-01-03 10:56:34'), diff --git a/cake/tests/fixtures/join_a_c_fixture.php b/cake/tests/fixtures/join_a_c_fixture.php index aa2bf5820..55ab3e758 100644 --- a/cake/tests/fixtures/join_a_c_fixture.php +++ b/cake/tests/fixtures/join_a_c_fixture.php @@ -54,7 +54,12 @@ class JoinACFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('join_a_id' => 1, 'join_c_id' => 2, 'other' => 'Data for Join A 1 Join C 2', 'created' => '2008-01-03 10:57:22', 'updated' => '2008-01-03 10:57:22'), array('join_a_id' => 2, 'join_c_id' => 3, 'other' => 'Data for Join A 2 Join C 3', 'created' => '2008-01-03 10:57:23', 'updated' => '2008-01-03 10:57:23'), diff --git a/cake/tests/fixtures/join_a_fixture.php b/cake/tests/fixtures/join_a_fixture.php index 85ac2769d..47fd44c1a 100644 --- a/cake/tests/fixtures/join_a_fixture.php +++ b/cake/tests/fixtures/join_a_fixture.php @@ -53,7 +53,12 @@ class JoinAFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'Join A 1', 'body' => 'Join A 1 Body', 'created' => '2008-01-03 10:54:23', 'updated' => '2008-01-03 10:54:23'), array('name' => 'Join A 2', 'body' => 'Join A 2 Body', 'created' => '2008-01-03 10:54:24', 'updated' => '2008-01-03 10:54:24'), diff --git a/cake/tests/fixtures/join_b_fixture.php b/cake/tests/fixtures/join_b_fixture.php index 97ec7c8a3..cd3884b73 100644 --- a/cake/tests/fixtures/join_b_fixture.php +++ b/cake/tests/fixtures/join_b_fixture.php @@ -52,7 +52,12 @@ class JoinBFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'Join B 1', 'created' => '2008-01-03 10:55:01', 'updated' => '2008-01-03 10:55:01'), array('name' => 'Join B 2', 'created' => '2008-01-03 10:55:02', 'updated' => '2008-01-03 10:55:02'), diff --git a/cake/tests/fixtures/join_c_fixture.php b/cake/tests/fixtures/join_c_fixture.php index 57f194b14..90c8ea17d 100644 --- a/cake/tests/fixtures/join_c_fixture.php +++ b/cake/tests/fixtures/join_c_fixture.php @@ -52,7 +52,12 @@ class JoinCFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'Join C 1', 'created' => '2008-01-03 10:56:11', 'updated' => '2008-01-03 10:56:11'), array('name' => 'Join C 2', 'created' => '2008-01-03 10:56:12', 'updated' => '2008-01-03 10:56:12'), diff --git a/cake/tests/fixtures/join_thing_fixture.php b/cake/tests/fixtures/join_thing_fixture.php index ba7424eb9..87b31c4ee 100644 --- a/cake/tests/fixtures/join_thing_fixture.php +++ b/cake/tests/fixtures/join_thing_fixture.php @@ -35,14 +35,14 @@ class JoinThingFixture extends CakeTestFixture { /** * name property - * + * * @var string 'JoinThing' * @access public */ var $name = 'JoinThing'; /** * fields property - * + * * @var array * @access public */ @@ -54,7 +54,12 @@ class JoinThingFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('something_id' => 1, 'something_else_id' => 2, 'doomed' => '1', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('something_id' => 2, 'something_else_id' => 3, 'doomed' => '0', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/message_fixture.php b/cake/tests/fixtures/message_fixture.php index c35ab9cc9..45193b2ab 100644 --- a/cake/tests/fixtures/message_fixture.php +++ b/cake/tests/fixtures/message_fixture.php @@ -51,6 +51,12 @@ class MessageFixture extends CakeTestFixture { 'thread_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('thread_id' => 1, 'name' => 'Thread 1, Message 1'), array('thread_id' => 2, 'name' => 'Thread 2, Message 1'), diff --git a/cake/tests/fixtures/node_fixture.php b/cake/tests/fixtures/node_fixture.php index 9db3ad80d..7c9ad1270 100644 --- a/cake/tests/fixtures/node_fixture.php +++ b/cake/tests/fixtures/node_fixture.php @@ -54,6 +54,12 @@ class NodeFixture extends CakeTestFixture { 'name' => 'string', 'state' => 'integer' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('id' => 1, 'name' => 'First', 'state' => 50), array('id' => 2, 'name' => 'Second', 'state' => 60), diff --git a/cake/tests/fixtures/numeric_article_fixture.php b/cake/tests/fixtures/numeric_article_fixture.php index 2db6dc8ce..432e1d1d3 100644 --- a/cake/tests/fixtures/numeric_article_fixture.php +++ b/cake/tests/fixtures/numeric_article_fixture.php @@ -35,14 +35,14 @@ class NumericArticleFixture extends CakeTestFixture { /** * name property - * + * * @var string 'NumericArticle' * @access public */ var $name = 'NumericArticle'; /** * fields property - * + * * @var array * @access public */ @@ -52,6 +52,12 @@ class NumericArticleFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('title' => 'First Article', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('title' => '12345abcde', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/person_fixture.php b/cake/tests/fixtures/person_fixture.php index da38e0b2a..baf5c0cc9 100644 --- a/cake/tests/fixtures/person_fixture.php +++ b/cake/tests/fixtures/person_fixture.php @@ -56,7 +56,12 @@ class PersonFixture extends CakeTestFixture { 'mother_id' => array('column' => array('mother_id', 'father_id'), 'unique' => 0) ) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'person', 'mother_id' => 2, 'father_id' => 3), array('name' => 'mother', 'mother_id' => 4, 'father_id' => 5), diff --git a/cake/tests/fixtures/portfolio_fixture.php b/cake/tests/fixtures/portfolio_fixture.php index 0a6903c0d..1f88ccb15 100644 --- a/cake/tests/fixtures/portfolio_fixture.php +++ b/cake/tests/fixtures/portfolio_fixture.php @@ -51,6 +51,12 @@ class PortfolioFixture extends CakeTestFixture { 'seller_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('seller_id' => 1, 'name' => 'Portfolio 1'), array('seller_id' => 1, 'name' => 'Portfolio 2'), diff --git a/cake/tests/fixtures/post_fixture.php b/cake/tests/fixtures/post_fixture.php index 2ebe3535d..fefbdecff 100644 --- a/cake/tests/fixtures/post_fixture.php +++ b/cake/tests/fixtures/post_fixture.php @@ -55,6 +55,12 @@ class PostFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('author_id' => 1, 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('author_id' => 3, 'title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/posts_tag_fixture.php b/cake/tests/fixtures/posts_tag_fixture.php index 4825a753c..79470715c 100644 --- a/cake/tests/fixtures/posts_tag_fixture.php +++ b/cake/tests/fixtures/posts_tag_fixture.php @@ -50,7 +50,12 @@ class PostsTagFixture extends CakeTestFixture { 'post_id' => array('type' => 'integer', 'null' => false), 'tag_id' => array('type' => 'string', 'null' => false), ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('post_id' => 1, 'tag_id' => 'tag1'), array('post_id' => 1, 'tag_id' => 'tag2'), diff --git a/cake/tests/fixtures/primary_model_fixture.php b/cake/tests/fixtures/primary_model_fixture.php index 856569042..a555b55d7 100644 --- a/cake/tests/fixtures/primary_model_fixture.php +++ b/cake/tests/fixtures/primary_model_fixture.php @@ -50,6 +50,12 @@ class PrimaryModelFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'primary_name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('primary_name' => 'Primary Name Existing') ); diff --git a/cake/tests/fixtures/product_fixture.php b/cake/tests/fixtures/product_fixture.php index dc063148b..f2ee178cc 100644 --- a/cake/tests/fixtures/product_fixture.php +++ b/cake/tests/fixtures/product_fixture.php @@ -33,8 +33,14 @@ * @subpackage cake.tests.fixtures */ class ProductFixture extends CakeTestFixture { +/** + * name property + * + * @var string 'Product' + * @access public + */ var $name = 'Product'; - /** +/** * fields property * * @var array @@ -46,7 +52,7 @@ class ProductFixture extends CakeTestFixture { 'type' => array('type' => 'string', 'length' => 255, 'null' => false), 'price' => array('type' => 'integer', 'null' => false), ); - /** +/** * records property * * @var array diff --git a/cake/tests/fixtures/project_fixture.php b/cake/tests/fixtures/project_fixture.php index 2ef4c683e..0a054dbc3 100644 --- a/cake/tests/fixtures/project_fixture.php +++ b/cake/tests/fixtures/project_fixture.php @@ -50,6 +50,12 @@ class ProjectFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('name' => 'Project 1'), array('name' => 'Project 2'), diff --git a/cake/tests/fixtures/sample_fixture.php b/cake/tests/fixtures/sample_fixture.php index 3bc0b34da..4bc3700c2 100644 --- a/cake/tests/fixtures/sample_fixture.php +++ b/cake/tests/fixtures/sample_fixture.php @@ -51,6 +51,12 @@ class SampleFixture extends CakeTestFixture { 'apple_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'length' => 40, 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('apple_id' => 3, 'name' => 'sample1'), array('apple_id' => 2, 'name' => 'sample2'), diff --git a/cake/tests/fixtures/secondary_model_fixture.php b/cake/tests/fixtures/secondary_model_fixture.php index f8cf3db1c..2546d68c4 100644 --- a/cake/tests/fixtures/secondary_model_fixture.php +++ b/cake/tests/fixtures/secondary_model_fixture.php @@ -50,6 +50,12 @@ class SecondaryModelFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'secondary_name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('secondary_name' => 'Secondary Name Existing') ); diff --git a/cake/tests/fixtures/session_fixture.php b/cake/tests/fixtures/session_fixture.php index af6f44cd8..9c1fd54bb 100644 --- a/cake/tests/fixtures/session_fixture.php +++ b/cake/tests/fixtures/session_fixture.php @@ -51,7 +51,12 @@ class SessionFixture extends CakeTestFixture { 'data' => array('type' => 'text','null' => true), 'expires' => array('type' => 'integer', 'length' => 11, 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array(); } ?> diff --git a/cake/tests/fixtures/something_else_fixture.php b/cake/tests/fixtures/something_else_fixture.php index f2c88fc1a..abe6d00a6 100644 --- a/cake/tests/fixtures/something_else_fixture.php +++ b/cake/tests/fixtures/something_else_fixture.php @@ -54,7 +54,12 @@ class SomethingElseFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/something_fixture.php b/cake/tests/fixtures/something_fixture.php index 6be7f0755..3c9c16cae 100644 --- a/cake/tests/fixtures/something_fixture.php +++ b/cake/tests/fixtures/something_fixture.php @@ -54,7 +54,12 @@ class SomethingFixture extends CakeTestFixture { 'created' => array('type' => 'datetime', 'null' => true), 'updated' => array('type' => 'datetime', 'null' => true) ); - +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), array('title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'), diff --git a/cake/tests/fixtures/stories_tag_fixture.php b/cake/tests/fixtures/stories_tag_fixture.php index 068549fd3..2a1d21882 100644 --- a/cake/tests/fixtures/stories_tag_fixture.php +++ b/cake/tests/fixtures/stories_tag_fixture.php @@ -51,6 +51,12 @@ class StoriesTagFixture extends CakeTestFixture { 'tag_id' => array('type' => 'integer', 'null' => false), 'indexes' => array('UNIQUE_STORY_TAG' => array('column'=> array('story', 'tag_id'), 'unique'=>1)) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('story' => 1, 'tag_id' => 1) ); diff --git a/cake/tests/fixtures/story_fixture.php b/cake/tests/fixtures/story_fixture.php index 6c7919559..ba50623cd 100644 --- a/cake/tests/fixtures/story_fixture.php +++ b/cake/tests/fixtures/story_fixture.php @@ -50,6 +50,12 @@ class StoryFixture extends CakeTestFixture { 'story' => array('type' => 'integer', 'key' => 'primary'), 'title' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('title' => 'First Story'), array('title' => 'Second Story') diff --git a/cake/tests/fixtures/syfile_fixture.php b/cake/tests/fixtures/syfile_fixture.php index 54d86d8bc..e5707ded7 100644 --- a/cake/tests/fixtures/syfile_fixture.php +++ b/cake/tests/fixtures/syfile_fixture.php @@ -52,6 +52,12 @@ class SyfileFixture extends CakeTestFixture { 'name' => array('type' => 'string', 'null' => false), 'item_count' => array('type' => 'integer', 'null' => true) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('image_id' => 1, 'name' => 'Syfile 1'), array('image_id' => 2, 'name' => 'Syfile 2'), diff --git a/cake/tests/fixtures/tag_fixture.php b/cake/tests/fixtures/tag_fixture.php index d42b7a72c..66594ee7f 100644 --- a/cake/tests/fixtures/tag_fixture.php +++ b/cake/tests/fixtures/tag_fixture.php @@ -52,6 +52,12 @@ class TagFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('tag' => 'tag1', 'created' => '2007-03-18 12:22:23', 'updated' => '2007-03-18 12:24:31'), array('tag' => 'tag2', 'created' => '2007-03-18 12:24:23', 'updated' => '2007-03-18 12:26:31'), diff --git a/cake/tests/fixtures/the_paper_monkies_fixture.php b/cake/tests/fixtures/the_paper_monkies_fixture.php index 449526e6b..69f46446e 100644 --- a/cake/tests/fixtures/the_paper_monkies_fixture.php +++ b/cake/tests/fixtures/the_paper_monkies_fixture.php @@ -50,6 +50,12 @@ class ThePaperMonkiesFixture extends CakeTestFixture { 'apple_id' => array('type' => 'integer', 'length' => 10, 'null' => true), 'device_id' => array('type' => 'integer', 'length' => 10, 'null' => true) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array(); } diff --git a/cake/tests/fixtures/thread_fixture.php b/cake/tests/fixtures/thread_fixture.php index e5f234aed..129c8d756 100644 --- a/cake/tests/fixtures/thread_fixture.php +++ b/cake/tests/fixtures/thread_fixture.php @@ -35,14 +35,14 @@ class ThreadFixture extends CakeTestFixture { /** * name property - * + * * @var string 'Thread' * @access public */ var $name = 'Thread'; /** * fields property - * + * * @var array * @access public */ @@ -51,6 +51,12 @@ class ThreadFixture extends CakeTestFixture { 'project_id' => array('type' => 'integer', 'null' => false), 'name' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('project_id' => 1, 'name' => 'Project 1, Thread 1'), array('project_id' => 1, 'name' => 'Project 1, Thread 2'), diff --git a/cake/tests/fixtures/translate_table_fixture.php b/cake/tests/fixtures/translate_table_fixture.php index 5b4873583..a74f394fd 100644 --- a/cake/tests/fixtures/translate_table_fixture.php +++ b/cake/tests/fixtures/translate_table_fixture.php @@ -35,21 +35,21 @@ class TranslateTableFixture extends CakeTestFixture { /** * name property - * + * * @var string 'TranslateTable' * @access public */ var $name = 'TranslateTable'; /** * table property - * + * * @var string 'another_i18n' * @access public */ var $table = 'another_i18n'; /** * fields property - * + * * @var array * @access public */ @@ -60,6 +60,12 @@ class TranslateTableFixture extends CakeTestFixture { 'foreign_key' => array('type' => 'integer', 'null' => false), 'field' => array('type' => 'string', 'null' => false), 'content' => array('type' => 'text')); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('locale' => 'eng', 'model' => 'TranslatedItemWithTable', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Another Title #1'), array('locale' => 'eng', 'model' => 'TranslatedItemWithTable', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Another Content #1') diff --git a/cake/tests/fixtures/translated_item_fixture.php b/cake/tests/fixtures/translated_item_fixture.php index 51b5254f6..42abc3e40 100644 --- a/cake/tests/fixtures/translated_item_fixture.php +++ b/cake/tests/fixtures/translated_item_fixture.php @@ -50,6 +50,12 @@ class TranslatedItemFixture extends CakeTestFixture { 'id' => array('type' => 'integer', 'key' => 'primary'), 'slug' => array('type' => 'string', 'null' => false) ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('slug' => 'first_translated'), array('slug' => 'second_translated'), diff --git a/cake/tests/fixtures/underscore_field_fixture.php b/cake/tests/fixtures/underscore_field_fixture.php index 84112746a..1b0c4afce 100644 --- a/cake/tests/fixtures/underscore_field_fixture.php +++ b/cake/tests/fixtures/underscore_field_fixture.php @@ -54,7 +54,12 @@ class UnderscoreFieldFixture extends CakeTestFixture { 'published' => array('type' => 'string', 'length' => 1, 'default' => 'N'), 'another_field' => array('type' => 'integer', 'length' => 3), ); - + /** + * records property + * + * @var array + * @access public + */ var $records = array( array('user_id' => 1, 'my_model_has_a_field' => 'First Article', 'body_field' => 'First Article Body', 'published' => 'Y', 'another_field' => 2), array('user_id' => 3, 'my_model_has_a_field' => 'Second Article', 'body_field' => 'Second Article Body', 'published' => 'Y', 'another_field' => 3), diff --git a/cake/tests/fixtures/user_fixture.php b/cake/tests/fixtures/user_fixture.php index 67b2d3180..251ba8328 100644 --- a/cake/tests/fixtures/user_fixture.php +++ b/cake/tests/fixtures/user_fixture.php @@ -53,6 +53,12 @@ class UserFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), array('user' => 'nate', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31'), diff --git a/cake/tests/fixtures/uuid_fixture.php b/cake/tests/fixtures/uuid_fixture.php index 8653449c2..28bfc179a 100644 --- a/cake/tests/fixtures/uuid_fixture.php +++ b/cake/tests/fixtures/uuid_fixture.php @@ -53,6 +53,12 @@ class UuidFixture extends CakeTestFixture { 'created' => 'datetime', 'updated' => 'datetime' ); +/** + * records property + * + * @var array + * @access public + */ var $records = array( array('id' => '47c36f9c-bc00-4d17-9626-4e183ca6822b', 'title' => 'Unique record 1', 'count' => 2, 'created' => '2008-03-13 01:16:23', 'updated' => '2008-03-13 01:18:31'), array('id' => '47c36f9c-f2b0-43f5-b3f7-4e183ca6822b', 'title' => 'Unique record 2', 'count' => 4, 'created' => '2008-03-13 01:18:24', 'updated' => '2008-03-13 01:20:32'), diff --git a/cake/tests/groups/components.group.php b/cake/tests/groups/components.group.php index da3a9741e..00353e67b 100644 --- a/cake/tests/groups/components.group.php +++ b/cake/tests/groups/components.group.php @@ -47,7 +47,12 @@ class AllCoreComponentsGroupTest extends GroupTest { * @access public */ var $label = 'All core components'; - +/** + * AllCoreComponentsGroupTest method + * + * @access public + * @return void + */ function AllCoreComponentsGroupTest() { TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'components'); } diff --git a/cake/tests/groups/lib.group.php b/cake/tests/groups/lib.group.php index 44231684c..3deab0487 100644 --- a/cake/tests/groups/lib.group.php +++ b/cake/tests/groups/lib.group.php @@ -47,7 +47,12 @@ class AllCoreLibGroupTest extends GroupTest { * @access public */ var $label = 'All cake/libs/* (Not yet implemented)'; - +/** + * AllCoreLibGroupTest method + * + * @access public + * @return void + */ function AllCoreLibGroupTest() { TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs'); } diff --git a/cake/tests/groups/lib_controller.group.php b/cake/tests/groups/lib_controller.group.php index ae81b510b..fdec70ef0 100644 --- a/cake/tests/groups/lib_controller.group.php +++ b/cake/tests/groups/lib_controller.group.php @@ -40,7 +40,12 @@ class LibControllerGroupTest extends GroupTest { * @access public */ var $label = 'All cake/libs/controller/* (Not yet implemented)'; - +/** + * LibControllerGroupTest method + * + * @access public + * @return void + */ function LibControllerGroupTest() { TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller'); }