From ae8386c48a08a49a4ff6146e453cfc71b2ae8d5c Mon Sep 17 00:00:00 2001 From: ADmad Date: Sat, 20 Apr 2013 13:10:06 +0530 Subject: [PATCH 01/16] Fix datetime comparison in relative datetime functions. Closes #2987,#3514 --- lib/Cake/Utility/CakeTime.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index 91337d954..60784cc30 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -468,7 +468,8 @@ class CakeTime { */ public static function isToday($dateString, $timezone = null) { $timestamp = self::fromString($dateString, $timezone); - return date('Y-m-d', $timestamp) == date('Y-m-d', time()); + $now = self::fromString('now', $timezone); + return date('Y-m-d', $timestamp) == date('Y-m-d', $now); } /** @@ -481,7 +482,8 @@ class CakeTime { */ public static function isThisWeek($dateString, $timezone = null) { $timestamp = self::fromString($dateString, $timezone); - return date('W o', $timestamp) == date('W o', time()); + $now = self::fromString('now', $timezone); + return date('W o', $timestamp) == date('W o', $now); } /** @@ -494,7 +496,8 @@ class CakeTime { */ public static function isThisMonth($dateString, $timezone = null) { $timestamp = self::fromString($dateString, $timezone); - return date('m Y', $timestamp) == date('m Y', time()); + $now = self::fromString('now', $timezone); + return date('m Y', $timestamp) == date('m Y', $now); } /** @@ -507,7 +510,8 @@ class CakeTime { */ public static function isThisYear($dateString, $timezone = null) { $timestamp = self::fromString($dateString, $timezone); - return date('Y', $timestamp) == date('Y', time()); + $now = self::fromString('now', $timezone); + return date('Y', $timestamp) == date('Y', $now); } /** @@ -521,7 +525,8 @@ class CakeTime { */ public static function wasYesterday($dateString, $timezone = null) { $timestamp = self::fromString($dateString, $timezone); - return date('Y-m-d', $timestamp) == date('Y-m-d', strtotime('yesterday')); + $yesterday = self::fromString('yesterday', $timezone); + return date('Y-m-d', $timestamp) == date('Y-m-d', $yesterday); } /** @@ -534,7 +539,8 @@ class CakeTime { */ public static function isTomorrow($dateString, $timezone = null) { $timestamp = self::fromString($dateString, $timezone); - return date('Y-m-d', $timestamp) == date('Y-m-d', strtotime('tomorrow')); + $tomorrow = self::fromString('tomorrow', $timezone); + return date('Y-m-d', $timestamp) == date('Y-m-d', $tomorrow); } /** @@ -880,8 +886,9 @@ class CakeTime { $date = self::fromString($dateString, $timezone); $interval = self::fromString('-' . $timeInterval); + $now = self::fromString('now', $timezone); - return $date >= $interval && $date <= time(); + return $date >= $interval && $date <= $now; } /** @@ -902,8 +909,9 @@ class CakeTime { $date = self::fromString($dateString, $timezone); $interval = self::fromString('+' . $timeInterval); + $now = self::fromString('now', $timezone); - return $date <= $interval && $date >= time(); + return $date <= $interval && $date >= $now; } /** From ca444136895e7c8d7a07d6d999d637045a20d2ea Mon Sep 17 00:00:00 2001 From: Saleh Souzanchi Date: Sat, 1 Jun 2013 14:16:23 +0430 Subject: [PATCH 02/16] fix Form::_selectOptions, when disabled attribute is not array so do not be disabled item of options --- .../Test/Case/View/Helper/FormHelperTest.php | 119 ++++++++++++++++++ lib/Cake/View/Helper/FormHelper.php | 2 +- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index d52193f42..0791ea6fd 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -4537,6 +4537,125 @@ class FormHelperTest extends CakeTestCase { '/div' ); $this->assertTags($result, $expected); + + $options = array(1 => 'One', 2 => 'Two', '3' => 'Three', '3x' => 'Stringy'); + $disabled = true; + $result = $this->Form->input('Contact.multiple', array('multiple' => 'multiple', 'disabled' => $disabled, 'options' => $options)); + $expected = array( + array('div' => array('class' => 'input select')), + array('label' => array('for' => 'ContactMultiple')), + 'Multiple', + '/label', + 'input' => array( + 'type' => 'hidden', 'name' => 'data[Contact][multiple]', 'value' => '', 'id' => 'ContactMultiple_' + ), + 'select' => array( + 'name' => 'data[Contact][multiple][]', 'disabled' => 'disabled', 'multiple' => 'multiple', 'id' => 'ContactMultiple' + ), + array('option' => array('value' => '1')), + 'One', + '/option', + array('option' => array('value' => '2')), + 'Two', + '/option', + array('option' => array('value' => '3')), + 'Three', + '/option', + array('option' => array('value' => '3x')), + 'Stringy', + '/option', + '/select', + '/div' + ); + $this->assertTags($result, $expected); + } + +/** + * Test generating select with disabled elements. + * + * @return void + */ + public function testSelectWithDisabledElements() { + $options = array(1 => 'One', 2 => 'Two', '3' => 'Three', '3x' => 'Stringy'); + $disabled = array(2, 3); + $result = $this->Form->select('Model.field', $options, array('disabled' => $disabled)); + $expected = array( + 'select' => array( + 'name' => 'data[Model][field]', 'id' => 'ModelField' + ), + array('option' => array('value' => '')), + '/option', + array('option' => array('value' => '1')), + 'One', + '/option', + array('option' => array('value' => '2', 'disabled' => 'disabled')), + 'Two', + '/option', + array('option' => array('value' => '3', 'disabled' => 'disabled')), + 'Three', + '/option', + array('option' => array('value' => '3x')), + 'Stringy', + '/option', + '/select' + ); + $this->assertTags($result, $expected); + + $options = array(1 => 'One', 2 => 'Two', '3' => 'Three', '3x' => 'Stringy'); + $disabled = array('2', '3x'); + $result = $this->Form->input('Model.field', array('disabled' => $disabled, 'options' => $options)); + $expected = array( + array('div' => array('class' => 'input select')), + array('label' => array('for' => 'ModelField')), + 'Field', + '/label', + 'select' => array( + 'name' => 'data[Model][field]', 'id' => 'ModelField' + ), + array('option' => array('value' => '1')), + 'One', + '/option', + array('option' => array('value' => '2', 'disabled' => 'disabled')), + 'Two', + '/option', + array('option' => array('value' => '3')), + 'Three', + '/option', + array('option' => array('value' => '3x', 'disabled' => 'disabled')), + 'Stringy', + '/option', + '/select', + '/div' + ); + $this->assertTags($result, $expected); + + $options = array(1 => 'One', 2 => 'Two', '3' => 'Three', '3x' => 'Stringy'); + $disabled = true; + $result = $this->Form->input('Model.field', array('disabled' => $disabled, 'options' => $options)); + $expected = array( + array('div' => array('class' => 'input select')), + array('label' => array('for' => 'ModelField')), + 'Field', + '/label', + 'select' => array( + 'name' => 'data[Model][field]', 'id' => 'ModelField', 'disabled' => 'disabled' + ), + array('option' => array('value' => '1')), + 'One', + '/option', + array('option' => array('value' => '2')), + 'Two', + '/option', + array('option' => array('value' => '3')), + 'Three', + '/option', + array('option' => array('value' => '3x')), + 'Stringy', + '/option', + '/select', + '/div' + ); + $this->assertTags($result, $expected); } /** diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 547ed9062..e671b20bc 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -2653,7 +2653,7 @@ class FormHelper extends AppHelper { ) { $htmlOptions['disabled'] = 'disabled'; } - if ($hasDisabled && !$disabledIsArray) { + if ($hasDisabled && !$disabledIsArray && $attributes['style'] === 'checkbox') { $htmlOptions['disabled'] = $attributes['disabled'] === true ? 'disabled' : $attributes['disabled']; } From cbf3228c346d7bcce5a4bdc1b2293fbc652bd2ed Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 2 Jun 2013 13:48:17 -0400 Subject: [PATCH 03/16] Fix inconsistent name/alias usage. TranslateBehavior should always use name instead of alias when creating/updating/saving new translate records. It already uses name when finding translations and the mismatch was causing translations to not be found when saved from an aliased model. Thanks to Joost de Keijzer for providing the initial patch. Fixes #3865 --- lib/Cake/Model/Behavior/TranslateBehavior.php | 6 ++-- .../Model/Behavior/TranslateBehaviorTest.php | 30 +++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index 4bdfcb1e1..eff7b4060 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -417,7 +417,7 @@ class TranslateBehavior extends ModelBehavior { } unset($this->runtime[$Model->alias]['beforeValidate'], $this->runtime[$Model->alias]['beforeSave']); - $conditions = array('model' => $Model->alias, 'foreign_key' => $Model->id); + $conditions = array('model' => $Model->name, 'foreign_key' => $Model->id); $RuntimeModel = $this->translateModel($Model); if ($created) { @@ -502,7 +502,7 @@ class TranslateBehavior extends ModelBehavior { */ public function afterDelete(Model $Model) { $RuntimeModel = $this->translateModel($Model); - $conditions = array('model' => $Model->alias, 'foreign_key' => $Model->id); + $conditions = array('model' => $Model->name, 'foreign_key' => $Model->id); $RuntimeModel->deleteAll($conditions); } @@ -611,7 +611,7 @@ class TranslateBehavior extends ModelBehavior { } } $associations[$association] = array_merge($default, array('conditions' => array( - 'model' => $Model->alias, + 'model' => $Model->name, $RuntimeModel->displayField => $field ))); } diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index f94dcf661..8e202b252 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -531,6 +531,36 @@ class TranslateBehaviorTest extends CakeTestCase { $this->assertEquals($expected, $result); } +/** + * test saving/deleting with an alias, uses the model name. + * + * @return void + */ + public function testSaveDeleteIgnoreAlias() { + $this->loadFixtures('Translate', 'TranslatedItem'); + + $TestModel = new TranslatedItem(array('alias' => 'SomethingElse')); + $TestModel->locale = 'spa'; + $data = array( + 'slug' => 'fourth_translated', + 'title' => 'Leyenda #4', + 'content' => 'Contenido #4', + 'translated_article_id' => 1, + ); + $TestModel->create($data); + $TestModel->save(); + $id = $TestModel->id; + $result = $TestModel->read(); + $expected = array($TestModel->alias => array_merge($data, array('id' => $id, 'locale' => 'spa'))); + $this->assertEquals($expected, $result); + + $TestModel->delete($id); + $result = $TestModel->translateModel()->find('count', array( + 'conditions' => array('foreign_key' => $id) + )); + $this->assertEquals(0, $result); + } + /** * test save multiple locales method * From 027cfe9496aac3d2b0218ce8ed1ab2561ba773e7 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 2 Jun 2013 18:12:51 -0400 Subject: [PATCH 04/16] Fix typo. --- lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php index 1fcfb9522..5b2e5c948 100644 --- a/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php @@ -26,7 +26,7 @@ App::uses('RedisEngine', 'Cache/Engine'); * * @package Cake.Test.Case.Cache.Engine */ -class RegisEngineTest extends CakeTestCase { +class RedisEngineTest extends CakeTestCase { /** * setUp method From 3aa189eb3a49abfb31cd1b25b32505d249e95044 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 3 Jun 2013 20:16:18 -0400 Subject: [PATCH 05/16] Fix cookie expiry time calculation on 32bit systems. strtotime() misbehaves on 32bit systems when the resulting timestamp would overflow an integer. Use a DateTime to workaround this issue. Fixes #3868 --- .../Controller/Component/CookieComponent.php | 8 +++--- .../Component/CookieComponentTest.php | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index a7c856a40..1e0660dd5 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -387,20 +387,20 @@ class CookieComponent extends Component { * @return integer Unix timestamp */ protected function _expire($expires = null) { - $now = time(); if (is_null($expires)) { return $this->_expires; } $this->_reset = $this->_expires; - if (!$expires) { return $this->_expires = 0; } + $now = new DateTime(); if (is_int($expires) || is_numeric($expires)) { - return $this->_expires = $now + intval($expires); + return $this->_expires = $now->format('U') + intval($expires); } - return $this->_expires = strtotime($expires, $now); + $now->modify($expires); + return $this->_expires = $now->format('U'); } /** diff --git a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php index 5b1beeb4c..aeb0e2503 100644 --- a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php @@ -201,6 +201,31 @@ class CookieComponentTest extends CakeTestCase { $this->assertEquals('value', $result); } +/** + * test write with distant future cookies + * + * @return void + */ + public function testWriteFarFuture() { + $this->Cookie->write('Testing', 'value', false, '+90 years'); + $future = new DateTime('now'); + $future->modify('+90 years'); + + $expected = array( + 'name' => $this->Cookie->name . '[Testing]', + 'value' => 'value', + 'path' => '/', + 'domain' => '', + 'secure' => false, + 'httpOnly' => false); + $result = $this->Controller->response->cookie($this->Cookie->name . '[Testing]'); + + $this->assertEquals($future->format('U'), $result['expire'], '', 3); + unset($result['expire']); + + $this->assertEquals($expected, $result); + } + /** * test write with httpOnly cookies * From 6c3a63ea9b15fc3931ff32cf087f896e7a73c682 Mon Sep 17 00:00:00 2001 From: Kim Egede Jakobsen Date: Wed, 5 Jun 2013 09:57:18 +0200 Subject: [PATCH 06/16] Correct small typos. --- lib/Cake/Console/Command/TestShell.php | 4 ++-- .../Case/Controller/Component/Auth/BasicAuthenticateTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Console/Command/TestShell.php b/lib/Cake/Console/Command/TestShell.php index c94249922..2c474b9c3 100644 --- a/lib/Cake/Console/Command/TestShell.php +++ b/lib/Cake/Console/Command/TestShell.php @@ -171,8 +171,8 @@ class TestShell extends Shell { */ public function initialize() { $this->_dispatcher = new CakeTestSuiteDispatcher(); - $sucess = $this->_dispatcher->loadTestFramework(); - if (!$sucess) { + $success = $this->_dispatcher->loadTestFramework(); + if (!$success) { throw new Exception(__d('cake_dev', 'Please install PHPUnit framework (http://www.phpunit.de)')); } } diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php index 0e317feff..6da7eab55 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php @@ -160,7 +160,7 @@ class BasicAuthenticateTest extends CakeTestCase { } /** - * test authenticate sucesss + * test authenticate success * * @return void */ From 4e9fb1f01aeba009c622c1018d8d51bdc50f0acc Mon Sep 17 00:00:00 2001 From: Ceeram Date: Wed, 5 Jun 2013 12:05:15 +0200 Subject: [PATCH 07/16] update travis.yml to test on php 5.5 --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5283442c4..48b3383e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 5.2 - 5.3 - 5.4 + - 5.5 env: - DB=mysql @@ -25,8 +26,8 @@ before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi" - chmod -R 777 ./app/tmp - sudo apt-get install lighttpd - - pear channel-discover pear.cakephp.org - - pear install --alldeps cakephp/CakePHP_CodeSniffer + - sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi" + - sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi" - phpenv rehash - set +H - echo " Date: Thu, 6 Jun 2013 17:45:52 +0200 Subject: [PATCH 08/16] Rewriting assertion to account for the actual case and not breaking in PHP 5.5 --- lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 4cd70ab0d..4b3aec644 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -1270,7 +1270,8 @@ class DboSourceTest extends CakeTestCase { $this->assertEquals(' LIMIT 10, 20', $result); $result = $db->limit(10, 300000000000000000000000000000); - $this->assertEquals(' LIMIT 0, 10', $result); + $scientificNotation = sprintf('%.1E', 300000000000000000000000000000); + $this->assertNotContains($scientificNotation, $result); } } From 04a6bfbda6d87f820a29585195436e1199c3d626 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 6 Jun 2013 17:55:55 +0200 Subject: [PATCH 09/16] Fixing postgres test for PHP 5.5 --- lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index a3a80d284..e43ec8fbd 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -1024,7 +1024,8 @@ class PostgresTest extends CakeTestCase { $this->assertEquals(' LIMIT 20 OFFSET 10', $result); $result = $db->limit(10, 300000000000000000000000000000); - $this->assertEquals(' LIMIT 10 OFFSET 0', $result); + $scientificNotation = sprintf('%.1E', 300000000000000000000000000000); + $this->assertNotContains($scientificNotation, $result); } } From f14c55916f624d741e50181fb7b0fa4d4bceda44 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 6 Jun 2013 18:12:07 +0200 Subject: [PATCH 10/16] Repeating previous change for SQLite, so it passes on PHP 5.5 --- lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index 0228535c8..564fe593e 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -495,7 +495,8 @@ class SqliteTest extends CakeTestCase { $this->assertEquals(' LIMIT 20 OFFSET 10', $result); $result = $db->limit(10, 300000000000000000000000000000); - $this->assertEquals(' LIMIT 10 OFFSET 0', $result); + $scientificNotation = sprintf('%.1E', 300000000000000000000000000000); + $this->assertNotContains($scientificNotation, $result); } } From dacf7e0ebebb31fa56ae78235ce60a72fddf7d32 Mon Sep 17 00:00:00 2001 From: Arnold Almeida Date: Fri, 7 Jun 2013 14:21:35 +0800 Subject: [PATCH 11/16] Update FixtureTask.php Using err() does not stop shell output when used in the context of a script. Also no nice color syntax to indicate that there was an error with one of the fixture generations. Using error() fixes that. --- lib/Cake/Console/Command/Task/FixtureTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index 6579e7aea..2a3cdce61 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -214,7 +214,7 @@ class FixtureTask extends BakeTask { $this->_Schema = new CakeSchema(); $data = $this->_Schema->read(array('models' => false, 'connection' => $this->connection)); if (!isset($data['tables'][$useTable])) { - $this->err('Could not find your selected table ' . $useTable); + $this->error('Could not find your selected table ' . $useTable); return false; } From 394bf1054d94a1297b81eaa7959420cb34568b19 Mon Sep 17 00:00:00 2001 From: euromark Date: Sat, 8 Jun 2013 04:29:08 +0200 Subject: [PATCH 12/16] remove name attribute where not necessary, clean up doc blocks --- .../Case/Console/Command/BakeShellTest.php | 3 - .../Case/Console/Command/SchemaShellTest.php | 9 +- .../Command/Task/ControllerTaskTest.php | 2 - .../Console/Command/Task/TestTaskTest.php | 28 -- .../Console/Command/Task/ViewTaskTest.php | 28 -- .../Controller/Component/Acl/DbAclTest.php | 14 +- .../Component/AuthComponentTest.php | 25 +- .../Component/EmailComponentTest.php | 9 +- .../Component/PaginatorComponentTest.php | 49 +-- .../Component/SecurityComponentTest.php | 7 - .../Test/Case/Controller/ComponentTest.php | 16 +- .../Controller/ControllerMergeVarsTest.php | 14 - .../Test/Case/Controller/ControllerTest.php | 51 +-- .../Test/Case/Controller/ScaffoldTest.php | 9 +- lib/Cake/Test/Case/Core/ObjectTest.php | 15 +- .../Test/Case/Error/ExceptionRendererTest.php | 7 - lib/Cake/Test/Case/Model/AclNodeTest.php | 42 +- .../Case/Model/Behavior/AclBehaviorTest.php | 7 - lib/Cake/Test/Case/Model/CakeSchemaTest.php | 75 +--- .../Datasource/Database/PostgresTest.php | 14 - .../Datasource/Database/SqlserverTest.php | 14 - .../Session/DatabaseSessionTest.php | 2 - lib/Cake/Test/Case/Model/models.php | 375 +++++++++--------- lib/Cake/Test/Case/Routing/DispatcherTest.php | 58 +-- .../Test/Case/Utility/ClassRegistryTest.php | 39 +- lib/Cake/Test/Case/Utility/SanitizeTest.php | 18 +- lib/Cake/Test/Case/Utility/XmlTest.php | 4 +- .../Test/Case/View/Helper/FormHelperTest.php | 2 +- .../Test/Case/View/Helper/HtmlHelperTest.php | 2 +- lib/Cake/Test/Case/View/ScaffoldViewTest.php | 2 +- lib/Cake/Test/Case/View/ThemeViewTest.php | 2 +- lib/Cake/Test/Case/View/ViewTest.php | 11 +- 32 files changed, 246 insertions(+), 707 deletions(-) diff --git a/lib/Cake/Test/Case/Console/Command/BakeShellTest.php b/lib/Cake/Test/Case/Console/Command/BakeShellTest.php index a1a4064e6..570d2c668 100644 --- a/lib/Cake/Test/Case/Console/Command/BakeShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/BakeShellTest.php @@ -31,9 +31,6 @@ App::uses('Controller', 'Controller'); if (!class_exists('UsersController')) { class UsersController extends Controller { - - public $name = 'Users'; - } } diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index 8eac220a7..fd3b7059a 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -32,17 +32,10 @@ App::uses('SchemaShell', 'Console/Command'); */ class SchemaShellTestSchema extends CakeSchema { -/** - * name property - * - * @var string 'MyApp' - */ - public $name = 'SchemaShellTest'; - /** * connection property * - * @var string 'test' + * @var string */ public $connection = 'test'; diff --git a/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php index ec4a6af93..5d85aa569 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php @@ -45,8 +45,6 @@ if (!$imported) { */ class BakeArticle extends Model { - public $name = 'BakeArticle'; - public $hasMany = array('BakeComment'); public $hasAndBelongsToMany = array('BakeTag'); diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index 4e8777265..00888dadf 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -36,13 +36,6 @@ App::uses('Model', 'Model'); */ class TestTaskArticle extends Model { -/** - * Model name - * - * @var string - */ - public $name = 'TestTaskArticle'; - /** * Table name to use * @@ -109,13 +102,6 @@ class TestTaskArticle extends Model { */ class TestTaskTag extends Model { -/** - * Model name - * - * @var string - */ - public $name = 'TestTaskTag'; - /** * Table name * @@ -153,13 +139,6 @@ class TestTaskAppModel extends Model { */ class TestTaskComment extends TestTaskAppModel { -/** - * Model name - * - * @var string - */ - public $name = 'TestTaskComment'; - /** * Table name * @@ -187,13 +166,6 @@ class TestTaskComment extends TestTaskAppModel { */ class TestTaskCommentsController extends Controller { -/** - * Controller Name - * - * @var string - */ - public $name = 'TestTaskComments'; - /** * Models to use * diff --git a/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php index fd80577c3..58d8af64f 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php @@ -39,13 +39,6 @@ App::uses('Controller', 'Controller'); */ class ViewTaskComment extends Model { -/** - * Model name - * - * @var string - */ - public $name = 'ViewTaskComment'; - /** * Table name * @@ -73,13 +66,6 @@ class ViewTaskComment extends Model { */ class ViewTaskArticle extends Model { -/** - * Model name - * - * @var string - */ - public $name = 'ViewTaskArticle'; - /** * Table name * @@ -95,13 +81,6 @@ class ViewTaskArticle extends Model { */ class ViewTaskCommentsController extends Controller { -/** - * Controller name - * - * @var string - */ - public $name = 'ViewTaskComments'; - /** * Testing public controller action * @@ -127,13 +106,6 @@ class ViewTaskCommentsController extends Controller { */ class ViewTaskArticlesController extends Controller { -/** - * Controller name - * - * @var string - */ - public $name = 'ViewTaskArticles'; - /** * Test public controller action * diff --git a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php index 56bc58fdd..2362c7e93 100644 --- a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php @@ -35,7 +35,7 @@ class AclNodeTwoTestBase extends AclNode { /** * useDbConfig property * - * @var string 'test' + * @var string */ public $useDbConfig = 'test'; @@ -57,14 +57,14 @@ class AroTwoTest extends AclNodeTwoTestBase { /** * name property * - * @var string 'AroTwoTest' + * @var string */ public $name = 'AroTwoTest'; /** * useTable property * - * @var string 'aro_twos' + * @var string */ public $useTable = 'aro_twos'; @@ -86,14 +86,14 @@ class AcoTwoTest extends AclNodeTwoTestBase { /** * name property * - * @var string 'AcoTwoTest' + * @var string */ public $name = 'AcoTwoTest'; /** * useTable property * - * @var string 'aco_twos' + * @var string */ public $useTable = 'aco_twos'; @@ -115,14 +115,14 @@ class PermissionTwoTest extends Permission { /** * name property * - * @var string 'PermissionTwoTest' + * @var string */ public $name = 'PermissionTwoTest'; /** * useTable property * - * @var string 'aros_aco_twos' + * @var string */ public $useTable = 'aros_aco_twos'; diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index bf39cb1bd..fac17315f 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -59,17 +59,10 @@ class TestAuthComponent extends AuthComponent { */ class AuthUser extends CakeTestModel { -/** - * name property - * - * @var string 'AuthUser' - */ - public $name = 'AuthUser'; - /** * useDbConfig property * - * @var string 'test' + * @var string */ public $useDbConfig = 'test'; @@ -82,13 +75,6 @@ class AuthUser extends CakeTestModel { */ class AuthTestController extends Controller { -/** - * name property - * - * @var string 'AuthTest' - */ - public $name = 'AuthTest'; - /** * uses property * @@ -203,13 +189,6 @@ class AuthTestController extends Controller { */ class AjaxAuthController extends Controller { -/** - * name property - * - * @var string 'AjaxAuth' - */ - public $name = 'AjaxAuth'; - /** * components property * @@ -278,7 +257,7 @@ class AuthComponentTest extends CakeTestCase { /** * name property * - * @var string 'Auth' + * @var string */ public $name = 'Auth'; diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index d38f76b3c..7d15bf6a0 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -93,13 +93,6 @@ class DebugCompTransport extends AbstractTransport { */ class EmailTestController extends Controller { -/** - * name property - * - * @var string 'EmailTest' - */ - public $name = 'EmailTest'; - /** * uses property * @@ -133,7 +126,7 @@ class EmailComponentTest extends CakeTestCase { /** * name property * - * @var string 'Email' + * @var string */ public $name = 'Email'; diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index f43af9705..44e9a4be0 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -32,13 +32,6 @@ App::uses('CakeResponse', 'Network'); */ class PaginatorTestController extends Controller { -/** - * name property - * - * @var string 'PaginatorTest' - */ - public $name = 'PaginatorTest'; - /** * components property * @@ -54,17 +47,10 @@ class PaginatorTestController extends Controller { */ class PaginatorControllerPost extends CakeTestModel { -/** - * name property - * - * @var string 'PaginatorControllerPost' - */ - public $name = 'PaginatorControllerPost'; - /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'posts'; @@ -124,17 +110,10 @@ class PaginatorControllerPost extends CakeTestModel { */ class ControllerPaginateModel extends CakeTestModel { -/** - * name property - * - * @var string 'ControllerPaginateModel' - */ - public $name = 'ControllerPaginateModel'; - /** * useTable property * - * @var string 'comments' + * @var string */ public $useTable = 'comments'; @@ -169,21 +148,21 @@ class PaginatorControllerComment extends CakeTestModel { /** * name property * - * @var string 'Comment' + * @var string */ public $name = 'Comment'; /** * useTable property * - * @var string 'comments' + * @var string */ public $useTable = 'comments'; /** * alias property * - * @var string 'PaginatorControllerComment' + * @var string */ public $alias = 'PaginatorControllerComment'; } @@ -195,31 +174,17 @@ class PaginatorControllerComment extends CakeTestModel { */ class PaginatorAuthor extends CakeTestModel { -/** - * name property - * - * @var string 'PaginatorAuthor' - */ - public $name = 'PaginatorAuthor'; - /** * useTable property * - * @var string 'authors' + * @var string */ public $useTable = 'authors'; /** * alias property * - * @var string 'PaginatorAuthor' - */ - public $alias = 'PaginatorAuthor'; - -/** - * alias property - * - * @var string 'PaginatorAuthor' + * @var string */ public $virtualFields = array( 'joined_offset' => 'PaginatorAuthor.id + 1' diff --git a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php index e541efc67..26ebd7f07 100644 --- a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php @@ -47,13 +47,6 @@ class TestSecurityComponent extends SecurityComponent { */ class SecurityTestController extends Controller { -/** - * name property - * - * @var string 'SecurityTest' - */ - public $name = 'SecurityTest'; - /** * components property * diff --git a/lib/Cake/Test/Case/Controller/ComponentTest.php b/lib/Cake/Test/Case/Controller/ComponentTest.php index 01947e435..8e5fca054 100644 --- a/lib/Cake/Test/Case/Controller/ComponentTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentTest.php @@ -28,13 +28,6 @@ App::uses('Component', 'Controller'); */ class ParamTestComponent extends Component { -/** - * name property - * - * @var string 'ParamTest' - */ - public $name = 'ParamTest'; - /** * components property * @@ -50,13 +43,6 @@ class ParamTestComponent extends Component { */ class ComponentTestController extends Controller { -/** - * name property - * - * @var string 'ComponentTest' - */ - public $name = 'ComponentTest'; - /** * uses property * @@ -146,7 +132,7 @@ class BananaComponent extends Component { /** * testField property * - * @var string 'BananaField' + * @var string */ public $testField = 'BananaField'; diff --git a/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php b/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php index c6cd23dff..fcba798c8 100644 --- a/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php @@ -60,13 +60,6 @@ class MergeVarComponent extends Object { */ class MergeVariablesController extends MergeVarsAppController { -/** - * name - * - * @var string - */ - public $name = 'MergeVariables'; - /** * uses * @@ -118,13 +111,6 @@ class MergeVarPluginAppController extends MergeVarsAppController { */ class MergePostsController extends MergeVarPluginAppController { -/** - * name - * - * @var string - */ - public $name = 'MergePosts'; - /** * uses * diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index 0067ef64a..7c0e76db9 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -58,17 +58,10 @@ class ControllerTestAppController extends Controller { */ class ControllerPost extends CakeTestModel { -/** - * name property - * - * @var string 'ControllerPost' - */ - public $name = 'ControllerPost'; - /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'posts'; @@ -121,13 +114,6 @@ class ControllerPost extends CakeTestModel { */ class ControllerCommentsController extends ControllerTestAppController { -/** - * name property - * - * @var string 'ControllerPost' - */ - public $name = 'ControllerComments'; - protected $_mergeParent = 'ControllerTestAppController'; } @@ -141,14 +127,14 @@ class ControllerComment extends CakeTestModel { /** * name property * - * @var string 'ControllerComment' + * @var string */ public $name = 'Comment'; /** * useTable property * - * @var string 'comments' + * @var string */ public $useTable = 'comments'; @@ -162,7 +148,7 @@ class ControllerComment extends CakeTestModel { /** * alias property * - * @var string 'ControllerComment' + * @var string */ public $alias = 'ControllerComment'; } @@ -174,24 +160,17 @@ class ControllerComment extends CakeTestModel { */ class ControllerAlias extends CakeTestModel { -/** - * name property - * - * @var string 'ControllerAlias' - */ - public $name = 'ControllerAlias'; - /** * alias property * - * @var string 'ControllerSomeAlias' + * @var string */ public $alias = 'ControllerSomeAlias'; /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'posts'; } @@ -205,20 +184,20 @@ class NameTest extends CakeTestModel { /** * name property - * @var string 'Name' + * @var string */ public $name = 'Name'; /** * useTable property - * @var string 'names' + * @var string */ public $useTable = 'comments'; /** * alias property * - * @var string 'ControllerComment' + * @var string */ public $alias = 'Name'; } @@ -230,12 +209,6 @@ class NameTest extends CakeTestModel { */ class TestController extends ControllerTestAppController { -/** - * name property - * @var string 'Name' - */ - public $name = 'Test'; - /** * helpers property * @@ -381,12 +354,6 @@ class Test2Component extends TestComponent { */ class AnotherTestController extends ControllerTestAppController { -/** - * name property - * @var string 'Name' - */ - public $name = 'AnotherTest'; - /** * uses property * diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index 5e7d4978c..8e942258c 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -33,13 +33,6 @@ require_once dirname(dirname(__FILE__)) . DS . 'Model' . DS . 'models.php'; */ class ScaffoldMockController extends Controller { -/** - * name property - * - * @var string 'ScaffoldMock' - */ - public $name = 'ScaffoldMock'; - /** * scaffold property * @@ -58,7 +51,7 @@ class ScaffoldMockControllerWithFields extends Controller { /** * name property * - * @var string 'ScaffoldMock' + * @var string */ public $name = 'ScaffoldMock'; diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php index e544751f1..2c4d64a36 100644 --- a/lib/Cake/Test/Case/Core/ObjectTest.php +++ b/lib/Cake/Test/Case/Core/ObjectTest.php @@ -30,17 +30,10 @@ App::uses('Model', 'Model'); */ class RequestActionPost extends CakeTestModel { -/** - * name property - * - * @var string 'ControllerPost' - */ - public $name = 'RequestActionPost'; - /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'posts'; } @@ -149,14 +142,14 @@ class TestObject extends Object { /** * firstName property * - * @var string 'Joel' + * @var string */ public $firstName = 'Joel'; /** * lastName property * - * @var string 'Moss' + * @var string */ public $lastName = 'Moss'; @@ -282,8 +275,6 @@ class ObjectTestModel extends CakeTestModel { public $useTable = false; - public $name = 'ObjectTestModel'; - } /** diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index c63cf7a7e..b69bc43ce 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -30,13 +30,6 @@ App::uses('Router', 'Routing'); */ class AuthBlueberryUser extends CakeTestModel { -/** - * name property - * - * @var string 'AuthBlueberryUser' - */ - public $name = 'AuthBlueberryUser'; - /** * useTable property * diff --git a/lib/Cake/Test/Case/Model/AclNodeTest.php b/lib/Cake/Test/Case/Model/AclNodeTest.php index 1bb7d4494..0fa8b3e8c 100644 --- a/lib/Cake/Test/Case/Model/AclNodeTest.php +++ b/lib/Cake/Test/Case/Model/AclNodeTest.php @@ -31,7 +31,7 @@ class DbAclNodeTestBase extends AclNode { /** * useDbConfig property * - * @var string 'test' + * @var string */ public $useDbConfig = 'test'; @@ -50,17 +50,10 @@ class DbAclNodeTestBase extends AclNode { */ class DbAroTest extends DbAclNodeTestBase { -/** - * name property - * - * @var string 'DbAroTest' - */ - public $name = 'DbAroTest'; - /** * useTable property * - * @var string 'aros' + * @var string */ public $useTable = 'aros'; @@ -79,17 +72,10 @@ class DbAroTest extends DbAclNodeTestBase { */ class DbAcoTest extends DbAclNodeTestBase { -/** - * name property - * - * @var string 'DbAcoTest' - */ - public $name = 'DbAcoTest'; - /** * useTable property * - * @var string 'acos' + * @var string */ public $useTable = 'acos'; @@ -108,17 +94,10 @@ class DbAcoTest extends DbAclNodeTestBase { */ class DbPermissionTest extends CakeTestModel { -/** - * name property - * - * @var string 'DbPermissionTest' - */ - public $name = 'DbPermissionTest'; - /** * useTable property * - * @var string 'aros_acos' + * @var string */ public $useTable = 'aros_acos'; @@ -144,17 +123,10 @@ class DbPermissionTest extends CakeTestModel { */ class DbAcoActionTest extends CakeTestModel { -/** - * name property - * - * @var string 'DbAcoActionTest' - */ - public $name = 'DbAcoActionTest'; - /** * useTable property * - * @var string 'aco_actions' + * @var string */ public $useTable = 'aco_actions'; @@ -176,14 +148,14 @@ class DbAroUserTest extends CakeTestModel { /** * name property * - * @var string 'AuthUser' + * @var string */ public $name = 'AuthUser'; /** * useTable property * - * @var string 'auth_users' + * @var string */ public $useTable = 'auth_users'; diff --git a/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php index 26dcfe624..85234fa08 100644 --- a/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php @@ -33,13 +33,6 @@ App::uses('DbAcl', 'Model'); */ class AclPerson extends CakeTestModel { -/** - * name property - * - * @var string - */ - public $name = 'AclPerson'; - /** * useTable property * diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index 2724a8fae..5b2633b57 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -29,17 +29,10 @@ App::uses('CakeTestFixture', 'TestSuite/Fixture'); */ class MyAppSchema extends CakeSchema { -/** - * name property - * - * @var string 'MyApp' - */ - public $name = 'MyApp'; - /** * connection property * - * @var string 'test' + * @var string */ public $connection = 'test'; @@ -127,7 +120,7 @@ class TestAppSchema extends CakeSchema { /** * name property * - * @var string 'MyApp' + * @var string */ public $name = 'MyApp'; @@ -232,17 +225,10 @@ class TestAppSchema extends CakeSchema { */ class SchemaPost extends CakeTestModel { -/** - * name property - * - * @var string 'SchemaPost' - */ - public $name = 'SchemaPost'; - /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'posts'; @@ -268,17 +254,10 @@ class SchemaPost extends CakeTestModel { */ class SchemaComment extends CakeTestModel { -/** - * name property - * - * @var string 'SchemaComment' - */ - public $name = 'SchemaComment'; - /** * useTable property * - * @var string 'comments' + * @var string */ public $useTable = 'comments'; @@ -297,17 +276,10 @@ class SchemaComment extends CakeTestModel { */ class SchemaTag extends CakeTestModel { -/** - * name property - * - * @var string 'SchemaTag' - */ - public $name = 'SchemaTag'; - /** * useTable property * - * @var string 'tags' + * @var string */ public $useTable = 'tags'; @@ -326,17 +298,10 @@ class SchemaTag extends CakeTestModel { */ class SchemaDatatype extends CakeTestModel { -/** - * name property - * - * @var string 'SchemaDatatype' - */ - public $name = 'SchemaDatatype'; - /** * useTable property * - * @var string 'datatypes' + * @var string */ public $useTable = 'datatypes'; } @@ -352,13 +317,6 @@ class SchemaDatatype extends CakeTestModel { * @package Cake.Test.Case.Model */ class Testdescribe extends CakeTestModel { - -/** - * name property - * - * @var string 'Testdescribe' - */ - public $name = 'Testdescribe'; } /** @@ -368,24 +326,17 @@ class Testdescribe extends CakeTestModel { */ class SchemaCrossDatabase extends CakeTestModel { -/** - * name property - * - * @var string 'SchemaCrossDatabase' - */ - public $name = 'SchemaCrossDatabase'; - /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'cross_database'; /** * useDbConfig property * - * @var string 'test2' + * @var string */ public $useDbConfig = 'test2'; } @@ -400,13 +351,14 @@ class SchemaCrossDatabaseFixture extends CakeTestFixture { /** * name property * - * @var string 'CrossDatabase' + * @var string */ public $name = 'CrossDatabase'; /** * table property * + * @var string */ public $table = 'cross_database'; @@ -438,13 +390,6 @@ class SchemaCrossDatabaseFixture extends CakeTestFixture { */ class SchemaPrefixAuthUser extends CakeTestModel { -/** - * name property - * - * @var string - */ - public $name = 'SchemaPrefixAuthUser'; - /** * table prefix * diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index e43ec8fbd..00eb1fa98 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -66,13 +66,6 @@ class DboPostgresTestDb extends Postgres { */ class PostgresTestModel extends Model { -/** - * name property - * - * @var string 'PostgresTestModel' - */ - public $name = 'PostgresTestModel'; - /** * useTable property * @@ -154,13 +147,6 @@ class PostgresTestModel extends Model { */ class PostgresClientTestModel extends Model { -/** - * name property - * - * @var string 'PostgresClientTestModel' - */ - public $name = 'PostgresClientTestModel'; - /** * useTable property * diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index 06381420f..464bafc1f 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -115,13 +115,6 @@ class SqlserverTestDb extends Sqlserver { */ class SqlserverTestModel extends CakeTestModel { -/** - * name property - * - * @var string 'SqlserverTestModel' - */ - public $name = 'SqlserverTestModel'; - /** * useTable property * @@ -188,13 +181,6 @@ class SqlserverTestModel extends CakeTestModel { */ class SqlserverClientTestModel extends CakeTestModel { -/** - * name property - * - * @var string 'SqlserverAssociatedTestModel' - */ - public $name = 'SqlserverClientTestModel'; - /** * useTable property * diff --git a/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php index 93f1b2139..60dce9713 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php @@ -30,8 +30,6 @@ class_exists('CakeSession'); */ class SessionTestModel extends Model { - public $name = 'SessionTestModel'; - public $useTable = 'sessions'; } diff --git a/lib/Cake/Test/Case/Model/models.php b/lib/Cake/Test/Case/Model/models.php index b7af71ad6..85e6b9715 100644 --- a/lib/Cake/Test/Case/Model/models.php +++ b/lib/Cake/Test/Case/Model/models.php @@ -75,7 +75,7 @@ class Test extends CakeTestModel { /** * name property * - * @var string 'Test' + * @var string */ public $name = 'Test'; @@ -112,17 +112,10 @@ class TestAlias extends CakeTestModel { /** * name property * - * @var string 'TestAlias' + * @var string */ public $name = 'TestAlias'; -/** - * alias property - * - * @var string 'TestAlias' - */ - public $alias = 'TestAlias'; - /** * schema property * @@ -155,7 +148,7 @@ class TestValidate extends CakeTestModel { /** * name property * - * @var string 'TestValidate' + * @var string */ public $name = 'TestValidate'; @@ -208,7 +201,7 @@ class User extends CakeTestModel { /** * name property * - * @var string 'User' + * @var string */ public $name = 'User'; @@ -246,7 +239,7 @@ class Article extends CakeTestModel { /** * name property * - * @var string 'Article' + * @var string */ public $name = 'Article'; @@ -343,14 +336,14 @@ class NumericArticle extends CakeTestModel { /** * name property * - * @var string 'NumericArticle' + * @var string */ public $name = 'NumericArticle'; /** * useTable property * - * @var string 'numeric_articles' + * @var string */ public $useTable = 'numeric_articles'; @@ -366,14 +359,14 @@ class Article10 extends CakeTestModel { /** * name property * - * @var string 'Article10' + * @var string */ public $name = 'Article10'; /** * useTable property * - * @var string 'articles' + * @var string */ public $useTable = 'articles'; @@ -396,7 +389,7 @@ class ArticleFeatured extends CakeTestModel { /** * name property * - * @var string 'ArticleFeatured' + * @var string */ public $name = 'ArticleFeatured'; @@ -447,7 +440,7 @@ class Featured extends CakeTestModel { /** * name property * - * @var string 'Featured' + * @var string */ public $name = 'Featured'; @@ -469,7 +462,7 @@ class Tag extends CakeTestModel { /** * name property * - * @var string 'Tag' + * @var string */ public $name = 'Tag'; } @@ -484,7 +477,7 @@ class ArticlesTag extends CakeTestModel { /** * name property * - * @var string 'ArticlesTag' + * @var string */ public $name = 'ArticlesTag'; } @@ -499,7 +492,7 @@ class ArticleFeaturedsTag extends CakeTestModel { /** * name property * - * @var string 'ArticleFeaturedsTag' + * @var string */ public $name = 'ArticleFeaturedsTag'; } @@ -514,7 +507,7 @@ class Comment extends CakeTestModel { /** * name property * - * @var string 'Comment' + * @var string */ public $name = 'Comment'; @@ -543,14 +536,14 @@ class ModifiedComment extends CakeTestModel { /** * name property * - * @var string 'Comment' + * @var string */ public $name = 'Comment'; /** * useTable property * - * @var string 'comments' + * @var string */ public $useTable = 'comments'; @@ -595,14 +588,14 @@ class AgainModifiedComment extends CakeTestModel { /** * name property * - * @var string 'Comment' + * @var string */ public $name = 'Comment'; /** * useTable property * - * @var string 'comments' + * @var string */ public $useTable = 'comments'; @@ -702,7 +695,7 @@ class Attachment extends CakeTestModel { /** * name property * - * @var string 'Attachment' + * @var string */ public $name = 'Attachment'; @@ -724,14 +717,14 @@ class ModifiedAttachment extends CakeTestModel { /** * name property * - * @var string 'ModifiedAttachment' + * @var string */ public $name = 'ModifiedAttachment'; /** * useTable property * - * @var string 'attachments' + * @var string */ public $useTable = 'attachments'; @@ -759,7 +752,7 @@ class Category extends CakeTestModel { /** * name property * - * @var string 'Category' + * @var string */ public $name = 'Category'; } @@ -774,7 +767,7 @@ class CategoryThread extends CakeTestModel { /** * name property * - * @var string 'CategoryThread' + * @var string */ public $name = 'CategoryThread'; @@ -796,7 +789,7 @@ class Apple extends CakeTestModel { /** * name property * - * @var string 'Apple' + * @var string */ public $name = 'Apple'; @@ -839,14 +832,14 @@ class Sample extends CakeTestModel { /** * name property * - * @var string 'Sample' + * @var string */ public $name = 'Sample'; /** * belongsTo property * - * @var string 'Apple' + * @var string */ public $belongsTo = 'Apple'; } @@ -861,14 +854,14 @@ class AnotherArticle extends CakeTestModel { /** * name property * - * @var string 'AnotherArticle' + * @var string */ public $name = 'AnotherArticle'; /** * hasMany property * - * @var string 'Home' + * @var string */ public $hasMany = 'Home'; } @@ -883,14 +876,14 @@ class Advertisement extends CakeTestModel { /** * name property * - * @var string 'Advertisement' + * @var string */ public $name = 'Advertisement'; /** * hasMany property * - * @var string 'Home' + * @var string */ public $hasMany = 'Home'; } @@ -905,7 +898,7 @@ class Home extends CakeTestModel { /** * name property * - * @var string 'Home' + * @var string */ public $name = 'Home'; @@ -927,7 +920,7 @@ class Post extends CakeTestModel { /** * name property * - * @var string 'Post' + * @var string */ public $name = 'Post'; @@ -962,7 +955,7 @@ class Author extends CakeTestModel { /** * name property * - * @var string 'Author' + * @var string */ public $name = 'Author'; @@ -996,7 +989,7 @@ class ModifiedAuthor extends Author { /** * name property * - * @var string 'Author' + * @var string */ public $name = 'Author'; @@ -1025,7 +1018,7 @@ class Project extends CakeTestModel { /** * name property * - * @var string 'Project' + * @var string */ public $name = 'Project'; @@ -1047,7 +1040,7 @@ class Thread extends CakeTestModel { /** * name property * - * @var string 'Thread' + * @var string */ public $name = 'Thread'; @@ -1076,7 +1069,7 @@ class Message extends CakeTestModel { /** * name property * - * @var string 'Message' + * @var string */ public $name = 'Message'; @@ -1098,7 +1091,7 @@ class Bid extends CakeTestModel { /** * name property * - * @var string 'Bid' + * @var string */ public $name = 'Bid'; @@ -1120,14 +1113,14 @@ class BiddingMessage extends CakeTestModel { /** * name property * - * @var string 'BiddingMessage' + * @var string */ public $name = 'BiddingMessage'; /** * primaryKey property * - * @var string 'bidding' + * @var string */ public $primaryKey = 'bidding'; @@ -1154,7 +1147,7 @@ class Bidding extends CakeTestModel { /** * name property * - * @var string 'Bidding' + * @var string */ public $name = 'Bidding'; @@ -1182,7 +1175,7 @@ class NodeAfterFind extends CakeTestModel { /** * name property * - * @var string 'NodeAfterFind' + * @var string */ public $name = 'NodeAfterFind'; @@ -1196,7 +1189,7 @@ class NodeAfterFind extends CakeTestModel { /** * useTable property * - * @var string 'apples' + * @var string */ public $useTable = 'apples'; @@ -1243,21 +1236,21 @@ class NodeAfterFindSample extends CakeTestModel { /** * name property * - * @var string 'NodeAfterFindSample' + * @var string */ public $name = 'NodeAfterFindSample'; /** * useTable property * - * @var string 'samples' + * @var string */ public $useTable = 'samples'; /** * belongsTo property * - * @var string 'NodeAfterFind' + * @var string */ public $belongsTo = 'NodeAfterFind'; } @@ -1272,7 +1265,7 @@ class NodeNoAfterFind extends CakeTestModel { /** * name property * - * @var string 'NodeAfterFind' + * @var string */ public $name = 'NodeAfterFind'; @@ -1286,7 +1279,7 @@ class NodeNoAfterFind extends CakeTestModel { /** * useTable property * - * @var string 'apples' + * @var string */ public $useTable = 'apples'; @@ -1322,7 +1315,7 @@ class Node extends CakeTestModel { /** * name property * - * @var string 'Node' + * @var string */ public $name = 'Node'; @@ -1352,7 +1345,7 @@ class Dependency extends CakeTestModel { /** * name property * - * @var string 'Dependency' + * @var string */ public $name = 'Dependency'; } @@ -1367,14 +1360,14 @@ class ModelA extends CakeTestModel { /** * name property * - * @var string 'ModelA' + * @var string */ public $name = 'ModelA'; /** * useTable property * - * @var string 'apples' + * @var string */ public $useTable = 'apples'; @@ -1396,14 +1389,14 @@ class ModelB extends CakeTestModel { /** * name property * - * @var string 'ModelB' + * @var string */ public $name = 'ModelB'; /** * useTable property * - * @var string 'messages' + * @var string */ public $useTable = 'messages'; @@ -1425,14 +1418,14 @@ class ModelC extends CakeTestModel { /** * name property * - * @var string 'ModelC' + * @var string */ public $name = 'ModelC'; /** * useTable property * - * @var string 'bids' + * @var string */ public $useTable = 'bids'; @@ -1454,14 +1447,14 @@ class ModelD extends CakeTestModel { /** * name property * - * @var string 'ModelD' + * @var string */ public $name = 'ModelD'; /** * useTable property * - * @var string 'threads' + * @var string */ public $useTable = 'threads'; } @@ -1476,7 +1469,7 @@ class Something extends CakeTestModel { /** * name property * - * @var string 'Something' + * @var string */ public $name = 'Something'; @@ -1498,7 +1491,7 @@ class SomethingElse extends CakeTestModel { /** * name property * - * @var string 'SomethingElse' + * @var string */ public $name = 'SomethingElse'; @@ -1520,7 +1513,7 @@ class JoinThing extends CakeTestModel { /** * name property * - * @var string 'JoinThing' + * @var string */ public $name = 'JoinThing'; @@ -1542,7 +1535,7 @@ class Portfolio extends CakeTestModel { /** * name property * - * @var string 'Portfolio' + * @var string */ public $name = 'Portfolio'; @@ -1564,7 +1557,7 @@ class Item extends CakeTestModel { /** * name property * - * @var string 'Item' + * @var string */ public $name = 'Item'; @@ -1593,7 +1586,7 @@ class ItemsPortfolio extends CakeTestModel { /** * name property * - * @var string 'ItemsPortfolio' + * @var string */ public $name = 'ItemsPortfolio'; } @@ -1608,7 +1601,7 @@ class Syfile extends CakeTestModel { /** * name property * - * @var string 'Syfile' + * @var string */ public $name = 'Syfile'; @@ -1630,7 +1623,7 @@ class Image extends CakeTestModel { /** * name property * - * @var string 'Image' + * @var string */ public $name = 'Image'; } @@ -1645,7 +1638,7 @@ class DeviceType extends CakeTestModel { /** * name property * - * @var string 'DeviceType' + * @var string */ public $name = 'DeviceType'; @@ -1685,7 +1678,7 @@ class DeviceTypeCategory extends CakeTestModel { /** * name property * - * @var string 'DeviceTypeCategory' + * @var string */ public $name = 'DeviceTypeCategory'; } @@ -1700,7 +1693,7 @@ class FeatureSet extends CakeTestModel { /** * name property * - * @var string 'FeatureSet' + * @var string */ public $name = 'FeatureSet'; } @@ -1715,7 +1708,7 @@ class ExteriorTypeCategory extends CakeTestModel { /** * name property * - * @var string 'ExteriorTypeCategory' + * @var string */ public $name = 'ExteriorTypeCategory'; @@ -1737,7 +1730,7 @@ class Document extends CakeTestModel { /** * name property * - * @var string 'Document' + * @var string */ public $name = 'Document'; @@ -1759,7 +1752,7 @@ class Device extends CakeTestModel { /** * name property * - * @var string 'Device' + * @var string */ public $name = 'Device'; } @@ -1774,7 +1767,7 @@ class DocumentDirectory extends CakeTestModel { /** * name property * - * @var string 'DocumentDirectory' + * @var string */ public $name = 'DocumentDirectory'; } @@ -1789,7 +1782,7 @@ class PrimaryModel extends CakeTestModel { /** * name property * - * @var string 'PrimaryModel' + * @var string */ public $name = 'PrimaryModel'; } @@ -1804,7 +1797,7 @@ class SecondaryModel extends CakeTestModel { /** * name property * - * @var string 'SecondaryModel' + * @var string */ public $name = 'SecondaryModel'; } @@ -1819,7 +1812,7 @@ class JoinA extends CakeTestModel { /** * name property * - * @var string 'JoinA' + * @var string */ public $name = 'JoinA'; @@ -1841,7 +1834,7 @@ class JoinB extends CakeTestModel { /** * name property * - * @var string 'JoinB' + * @var string */ public $name = 'JoinB'; @@ -1863,7 +1856,7 @@ class JoinC extends CakeTestModel { /** * name property * - * @var string 'JoinC' + * @var string */ public $name = 'JoinC'; @@ -1885,14 +1878,14 @@ class ThePaper extends CakeTestModel { /** * name property * - * @var string 'ThePaper' + * @var string */ public $name = 'ThePaper'; /** * useTable property * - * @var string 'apples' + * @var string */ public $useTable = 'apples'; @@ -1921,14 +1914,14 @@ class Monkey extends CakeTestModel { /** * name property * - * @var string 'Monkey' + * @var string */ public $name = 'Monkey'; /** * useTable property * - * @var string 'devices' + * @var string */ public $useTable = 'devices'; } @@ -1943,14 +1936,14 @@ class AssociationTest1 extends CakeTestModel { /** * useTable property * - * @var string 'join_as' + * @var string */ public $useTable = 'join_as'; /** * name property * - * @var string 'AssociationTest1' + * @var string */ public $name = 'AssociationTest1'; @@ -1974,14 +1967,14 @@ class AssociationTest2 extends CakeTestModel { /** * useTable property * - * @var string 'join_bs' + * @var string */ public $useTable = 'join_bs'; /** * name property * - * @var string 'AssociationTest2' + * @var string */ public $name = 'AssociationTest2'; @@ -2073,7 +2066,7 @@ class Uuid extends CakeTestModel { /** * name property * - * @var string 'Uuid' + * @var string */ public $name = 'Uuid'; } @@ -2088,7 +2081,7 @@ class DataTest extends CakeTestModel { /** * name property * - * @var string 'DataTest' + * @var string */ public $name = 'DataTest'; } @@ -2103,7 +2096,7 @@ class TheVoid extends CakeTestModel { /** * name property * - * @var string 'TheVoid' + * @var string */ public $name = 'TheVoid'; @@ -2125,7 +2118,7 @@ class ValidationTest1 extends CakeTestModel { /** * name property * - * @var string 'ValidationTest' + * @var string */ public $name = 'ValidationTest1'; @@ -2211,7 +2204,7 @@ class ValidationTest2 extends CakeTestModel { /** * name property * - * @var string 'ValidationTest2' + * @var string */ public $name = 'ValidationTest2'; @@ -2268,7 +2261,7 @@ class Person extends CakeTestModel { /** * name property * - * @var string 'Person' + * @var string */ public $name = 'Person'; @@ -2299,7 +2292,7 @@ class UnderscoreField extends CakeTestModel { /** * name property * - * @var string 'UnderscoreField' + * @var string */ public $name = 'UnderscoreField'; } @@ -2314,7 +2307,7 @@ class Product extends CakeTestModel { /** * name property * - * @var string 'Product' + * @var string */ public $name = 'Product'; } @@ -2329,14 +2322,14 @@ class Story extends CakeTestModel { /** * name property * - * @var string 'Story' + * @var string */ public $name = 'Story'; /** * primaryKey property * - * @var string 'story' + * @var string */ public $primaryKey = 'story'; @@ -2365,7 +2358,7 @@ class Cd extends CakeTestModel { /** * name property * - * @var string 'Cd' + * @var string */ public $name = 'Cd'; @@ -2394,7 +2387,7 @@ class Book extends CakeTestModel { /** * name property * - * @var string 'Book' + * @var string */ public $name = 'Book'; @@ -2423,7 +2416,7 @@ class OverallFavorite extends CakeTestModel { /** * name property * - * @var string 'OverallFavorite' + * @var string */ public $name = 'OverallFavorite'; } @@ -2438,7 +2431,7 @@ class MyUser extends CakeTestModel { /** * name property * - * @var string 'MyUser' + * @var string */ public $name = 'MyUser'; @@ -2460,7 +2453,7 @@ class MyCategory extends CakeTestModel { /** * name property * - * @var string 'MyCategory' + * @var string */ public $name = 'MyCategory'; @@ -2482,7 +2475,7 @@ class MyProduct extends CakeTestModel { /** * name property * - * @var string 'MyProduct' + * @var string */ public $name = 'MyProduct'; @@ -2504,7 +2497,7 @@ class MyCategoriesMyUser extends CakeTestModel { /** * name property * - * @var string 'MyCategoriesMyUser' + * @var string */ public $name = 'MyCategoriesMyUser'; } @@ -2519,7 +2512,7 @@ class MyCategoriesMyProduct extends CakeTestModel { /** * name property * - * @var string 'MyCategoriesMyProduct' + * @var string */ public $name = 'MyCategoriesMyProduct'; } @@ -2535,7 +2528,7 @@ class NumberTree extends CakeTestModel { /** * name property * - * @var string 'NumberTree' + * @var string */ public $name = 'NumberTree'; @@ -2599,7 +2592,7 @@ class NumberTreeTwo extends NumberTree { /** * name property * - * @var string 'NumberTree' + * @var string */ public $name = 'NumberTreeTwo'; @@ -2621,7 +2614,7 @@ class FlagTree extends NumberTree { /** * name property * - * @var string 'FlagTree' + * @var string */ public $name = 'FlagTree'; } @@ -2636,7 +2629,7 @@ class UnconventionalTree extends NumberTree { /** * name property * - * @var string 'FlagTree' + * @var string */ public $name = 'UnconventionalTree'; @@ -2660,7 +2653,7 @@ class UuidTree extends NumberTree { /** * name property * - * @var string 'FlagTree' + * @var string */ public $name = 'UuidTree'; } @@ -2675,7 +2668,7 @@ class Campaign extends CakeTestModel { /** * name property * - * @var string 'Campaign' + * @var string */ public $name = 'Campaign'; @@ -2697,7 +2690,7 @@ class Ad extends CakeTestModel { /** * name property * - * @var string 'Ad' + * @var string */ public $name = 'Ad'; @@ -2726,7 +2719,7 @@ class AfterTree extends NumberTree { /** * name property * - * @var string 'AfterTree' + * @var string */ public $name = 'AfterTree'; @@ -2755,21 +2748,21 @@ class Content extends CakeTestModel { /** * name property * - * @var string 'Content' + * @var string */ public $name = 'Content'; /** * useTable property * - * @var string 'Content' + * @var string */ public $useTable = 'Content'; /** * primaryKey property * - * @var string 'iContentId' + * @var string */ public $primaryKey = 'iContentId'; @@ -2791,21 +2784,21 @@ class Account extends CakeTestModel { /** * name property * - * @var string 'Account' + * @var string */ public $name = 'Account'; /** * useTable property * - * @var string 'Account' + * @var string */ public $useTable = 'Accounts'; /** * primaryKey property * - * @var string 'iAccountId' + * @var string */ public $primaryKey = 'iAccountId'; } @@ -2820,21 +2813,21 @@ class ContentAccount extends CakeTestModel { /** * name property * - * @var string 'Account' + * @var string */ public $name = 'ContentAccount'; /** * useTable property * - * @var string 'Account' + * @var string */ public $useTable = 'ContentAccounts'; /** * primaryKey property * - * @var string 'iAccountId' + * @var string */ public $primaryKey = 'iContentAccountsId'; } @@ -2881,7 +2874,7 @@ class TestPluginArticle extends CakeTestModel { /** * name property * - * @var string 'TestPluginArticle' + * @var string */ public $name = 'TestPluginArticle'; @@ -2916,7 +2909,7 @@ class TestPluginComment extends CakeTestModel { /** * name property * - * @var string 'TestPluginComment' + * @var string */ public $name = 'TestPluginComment'; @@ -2944,7 +2937,7 @@ class Uuidportfolio extends CakeTestModel { /** * name property * - * @var string 'Uuidportfolio' + * @var string */ public $name = 'Uuidportfolio'; @@ -2966,7 +2959,7 @@ class Uuiditem extends CakeTestModel { /** * name property * - * @var string 'Item' + * @var string */ public $name = 'Uuiditem'; @@ -2989,7 +2982,7 @@ class UuiditemsUuidportfolio extends CakeTestModel { /** * name property * - * @var string 'ItemsPortfolio' + * @var string */ public $name = 'UuiditemsUuidportfolio'; } @@ -3019,21 +3012,21 @@ class TranslateTestModel extends CakeTestModel { /** * name property * - * @var string 'TranslateTestModel' + * @var string */ public $name = 'TranslateTestModel'; /** * useTable property * - * @var string 'i18n' + * @var string */ public $useTable = 'i18n'; /** * displayField property * - * @var string 'field' + * @var string */ public $displayField = 'field'; } @@ -3048,21 +3041,21 @@ class TranslateWithPrefix extends CakeTestModel { /** * name property * - * @var string 'TranslateTestModel' + * @var string */ public $name = 'TranslateWithPrefix'; /** * tablePrefix property * - * @var string 'i18n' + * @var string */ public $tablePrefix = 'i18n_'; /** * displayField property * - * @var string 'field' + * @var string */ public $displayField = 'field'; @@ -3078,7 +3071,7 @@ class TranslatedItem extends CakeTestModel { /** * name property * - * @var string 'TranslatedItem' + * @var string */ public $name = 'TranslatedItem'; @@ -3099,7 +3092,7 @@ class TranslatedItem extends CakeTestModel { /** * translateModel property * - * @var string 'TranslateTestModel' + * @var string */ public $translateModel = 'TranslateTestModel'; @@ -3115,7 +3108,7 @@ class TranslatedItem2 extends CakeTestModel { /** * name property * - * @var string 'TranslatedItem' + * @var string */ public $name = 'TranslatedItem'; @@ -3152,14 +3145,14 @@ class TranslatedItemWithTable extends CakeTestModel { /** * name property * - * @var string 'TranslatedItemWithTable' + * @var string */ public $name = 'TranslatedItemWithTable'; /** * useTable property * - * @var string 'translated_items' + * @var string */ public $useTable = 'translated_items'; @@ -3187,7 +3180,7 @@ class TranslatedItemWithTable extends CakeTestModel { /** * translateTable property * - * @var string 'another_i18n' + * @var string */ public $translateTable = 'another_i18n'; @@ -3203,21 +3196,21 @@ class TranslateArticleModel extends CakeTestModel { /** * name property * - * @var string 'TranslateArticleModel' + * @var string */ public $name = 'TranslateArticleModel'; /** * useTable property * - * @var string 'article_i18n' + * @var string */ public $useTable = 'article_i18n'; /** * displayField property * - * @var string 'field' + * @var string */ public $displayField = 'field'; @@ -3233,7 +3226,7 @@ class TranslatedArticle extends CakeTestModel { /** * name property * - * @var string 'TranslatedArticle' + * @var string */ public $name = 'TranslatedArticle'; @@ -3254,7 +3247,7 @@ class TranslatedArticle extends CakeTestModel { /** * translateModel property * - * @var string 'TranslateArticleModel' + * @var string */ public $translateModel = 'TranslateArticleModel'; @@ -3535,7 +3528,7 @@ class TestModel extends CakeTestModel { /** * name property * - * @var string 'TestModel' + * @var string */ public $name = 'TestModel'; @@ -3610,7 +3603,7 @@ class TestModel2 extends CakeTestModel { /** * name property * - * @var string 'TestModel2' + * @var string */ public $name = 'TestModel2'; @@ -3632,7 +3625,7 @@ class TestModel3 extends CakeTestModel { /** * name property * - * @var string 'TestModel3' + * @var string */ public $name = 'TestModel3'; @@ -3654,14 +3647,14 @@ class TestModel4 extends CakeTestModel { /** * name property * - * @var string 'TestModel4' + * @var string */ public $name = 'TestModel4'; /** * table property * - * @var string 'test_model4' + * @var string */ public $table = 'test_model4'; @@ -3738,14 +3731,14 @@ class TestModel4TestModel7 extends CakeTestModel { /** * name property * - * @var string 'TestModel4TestModel7' + * @var string */ public $name = 'TestModel4TestModel7'; /** * table property * - * @var string 'test_model4_test_model7' + * @var string */ public $table = 'test_model4_test_model7'; @@ -3783,14 +3776,14 @@ class TestModel5 extends CakeTestModel { /** * name property * - * @var string 'TestModel5' + * @var string */ public $name = 'TestModel5'; /** * table property * - * @var string 'test_model5' + * @var string */ public $table = 'test_model5'; @@ -3851,14 +3844,14 @@ class TestModel6 extends CakeTestModel { /** * name property * - * @var string 'TestModel6' + * @var string */ public $name = 'TestModel6'; /** * table property * - * @var string 'test_model6' + * @var string */ public $table = 'test_model6'; @@ -3911,14 +3904,14 @@ class TestModel7 extends CakeTestModel { /** * name property * - * @var string 'TestModel7' + * @var string */ public $name = 'TestModel7'; /** * table property * - * @var string 'test_model7' + * @var string */ public $table = 'test_model7'; @@ -3958,14 +3951,14 @@ class TestModel8 extends CakeTestModel { /** * name property * - * @var string 'TestModel8' + * @var string */ public $name = 'TestModel8'; /** * table property * - * @var string 'test_model8' + * @var string */ public $table = 'test_model8'; @@ -4019,14 +4012,14 @@ class TestModel9 extends CakeTestModel { /** * name property * - * @var string 'TestModel9' + * @var string */ public $name = 'TestModel9'; /** * table property * - * @var string 'test_model9' + * @var string */ public $table = 'test_model9'; @@ -4080,14 +4073,14 @@ class Level extends CakeTestModel { /** * name property * - * @var string 'Level' + * @var string */ public $name = 'Level'; /** * table property * - * @var string 'level' + * @var string */ public $table = 'level'; @@ -4139,14 +4132,14 @@ class Group extends CakeTestModel { /** * name property * - * @var string 'Group' + * @var string */ public $name = 'Group'; /** * table property * - * @var string 'group' + * @var string */ public $table = 'group'; @@ -4199,14 +4192,14 @@ class User2 extends CakeTestModel { /** * name property * - * @var string 'User2' + * @var string */ public $name = 'User2'; /** * table property * - * @var string 'user' + * @var string */ public $table = 'user'; @@ -4271,14 +4264,14 @@ class Category2 extends CakeTestModel { /** * name property * - * @var string 'Category2' + * @var string */ public $name = 'Category2'; /** * table property * - * @var string 'category' + * @var string */ public $table = 'category'; @@ -4354,14 +4347,14 @@ class Article2 extends CakeTestModel { /** * name property * - * @var string 'Article2' + * @var string */ public $name = 'Article2'; /** * table property * - * @var string 'article' + * @var string */ public $table = 'articles'; @@ -4426,14 +4419,14 @@ class CategoryFeatured2 extends CakeTestModel { /** * name property * - * @var string 'CategoryFeatured2' + * @var string */ public $name = 'CategoryFeatured2'; /** * table property * - * @var string 'category_featured' + * @var string */ public $table = 'category_featured'; @@ -4474,14 +4467,14 @@ class Featured2 extends CakeTestModel { /** * name property * - * @var string 'Featured2' + * @var string */ public $name = 'Featured2'; /** * table property * - * @var string 'featured2' + * @var string */ public $table = 'featured2'; @@ -4532,14 +4525,14 @@ class Comment2 extends CakeTestModel { /** * name property * - * @var string 'Comment2' + * @var string */ public $name = 'Comment2'; /** * table property * - * @var string 'comment' + * @var string */ public $table = 'comment'; @@ -4586,14 +4579,14 @@ class ArticleFeatured2 extends CakeTestModel { /** * name property * - * @var string 'ArticleFeatured2' + * @var string */ public $name = 'ArticleFeatured2'; /** * table property * - * @var string 'article_featured' + * @var string */ public $table = 'article_featured'; @@ -4666,7 +4659,7 @@ class MysqlTestModel extends Model { /** * name property * - * @var string 'MysqlTestModel' + * @var string */ public $name = 'MysqlTestModel'; @@ -4758,7 +4751,7 @@ class ScaffoldMock extends CakeTestModel { /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'articles'; @@ -4812,7 +4805,7 @@ class ScaffoldUser extends CakeTestModel { /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'users'; @@ -4839,7 +4832,7 @@ class ScaffoldComment extends CakeTestModel { /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'comments'; @@ -4866,7 +4859,7 @@ class ScaffoldTag extends CakeTestModel { /** * useTable property * - * @var string 'posts' + * @var string */ public $useTable = 'tags'; diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index a1bc0cd94..0c3850a07 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -122,13 +122,6 @@ interface DispatcherTestInterfaceController { */ class MyPluginController extends MyPluginAppController { -/** - * name property - * - * @var string 'MyPlugin' - */ - public $name = 'MyPlugin'; - /** * uses property * @@ -173,13 +166,6 @@ class MyPluginController extends MyPluginAppController { */ class SomePagesController extends AppController { -/** - * name property - * - * @var string 'SomePages' - */ - public $name = 'SomePages'; - /** * uses property * @@ -234,13 +220,6 @@ class SomePagesController extends AppController { */ class OtherPagesController extends MyPluginAppController { -/** - * name property - * - * @var string 'OtherPages' - */ - public $name = 'OtherPages'; - /** * uses property * @@ -276,13 +255,6 @@ class OtherPagesController extends MyPluginAppController { */ class TestDispatchPagesController extends AppController { -/** - * name property - * - * @var string 'TestDispatchPages' - */ - public $name = 'TestDispatchPages'; - /** * uses property * @@ -325,13 +297,6 @@ class ArticlesTestAppController extends AppController { */ class ArticlesTestController extends ArticlesTestAppController { -/** - * name property - * - * @var string 'ArticlesTest' - */ - public $name = 'ArticlesTest'; - /** * uses property * @@ -366,13 +331,6 @@ class ArticlesTestController extends ArticlesTestAppController { */ class SomePostsController extends AppController { -/** - * name property - * - * @var string 'SomePosts' - */ - public $name = 'SomePosts'; - /** * uses property * @@ -428,13 +386,6 @@ class SomePostsController extends AppController { */ class TestCachedPagesController extends Controller { -/** - * name property - * - * @var string 'TestCachedPages' - */ - public $name = 'TestCachedPages'; - /** * uses property * @@ -470,7 +421,7 @@ class TestCachedPagesController extends Controller { /** * viewPath property * - * @var string 'posts' + * @var string */ public $viewPath = 'Posts'; @@ -529,13 +480,6 @@ class TestCachedPagesController extends Controller { */ class TimesheetsController extends Controller { -/** - * name property - * - * @var string 'Timesheets' - */ - public $name = 'Timesheets'; - /** * uses property * diff --git a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php index 59095ac38..08d0575d7 100644 --- a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php +++ b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php @@ -41,13 +41,6 @@ class ClassRegisterModel extends CakeTestModel { * @package Cake.Test.Case.Utility */ class RegisterArticle extends ClassRegisterModel { - -/** - * name property - * - * @var string 'RegisterArticle' - */ - public $name = 'RegisterArticle'; } /** @@ -56,13 +49,6 @@ class RegisterArticle extends ClassRegisterModel { * @package Cake.Test.Case.Utility */ class RegisterArticleFeatured extends ClassRegisterModel { - -/** - * name property - * - * @var string 'RegisterArticleFeatured' - */ - public $name = 'RegisterArticleFeatured'; } /** @@ -71,13 +57,6 @@ class RegisterArticleFeatured extends ClassRegisterModel { * @package Cake.Test.Case.Utility */ class RegisterArticleTag extends ClassRegisterModel { - -/** - * name property - * - * @var string 'RegisterArticleTag' - */ - public $name = 'RegisterArticleTag'; } /** @@ -90,7 +69,7 @@ class RegistryPluginAppModel extends ClassRegisterModel { /** * tablePrefix property * - * @var string 'something_' + * @var string */ public $tablePrefix = 'something_'; } @@ -101,13 +80,6 @@ class RegistryPluginAppModel extends ClassRegisterModel { * @package Cake.Test.Case.Utility */ class TestRegistryPluginModel extends RegistryPluginAppModel { - -/** - * name property - * - * @var string 'TestRegistryPluginModel' - */ - public $name = 'TestRegistryPluginModel'; } /** @@ -116,13 +88,6 @@ class TestRegistryPluginModel extends RegistryPluginAppModel { * @package Cake.Test.Case.Utility */ class RegisterCategory extends ClassRegisterModel { - -/** - * name property - * - * @var string 'RegisterCategory' - */ - public $name = 'RegisterCategory'; } /** * RegisterPrefixedDs class @@ -134,7 +99,7 @@ class RegisterPrefixedDs extends ClassRegisterModel { /** * useDbConfig property * - * @var string 'doesnotexist' + * @var string */ public $useDbConfig = 'doesnotexist'; } diff --git a/lib/Cake/Test/Case/Utility/SanitizeTest.php b/lib/Cake/Test/Case/Utility/SanitizeTest.php index 281a00fde..86b75fc9e 100644 --- a/lib/Cake/Test/Case/Utility/SanitizeTest.php +++ b/lib/Cake/Test/Case/Utility/SanitizeTest.php @@ -27,17 +27,10 @@ App::uses('Sanitize', 'Utility'); */ class SanitizeDataTest extends CakeTestModel { -/** - * name property - * - * @var string 'SanitizeDataTest' - */ - public $name = 'SanitizeDataTest'; - /** * useTable property * - * @var string 'data_tests' + * @var string */ public $useTable = 'data_tests'; } @@ -49,17 +42,10 @@ class SanitizeDataTest extends CakeTestModel { */ class SanitizeArticle extends CakeTestModel { -/** - * name property - * - * @var string 'Article' - */ - public $name = 'SanitizeArticle'; - /** * useTable property * - * @var string 'articles' + * @var string */ public $useTable = 'articles'; } diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index f5fed1816..46dac3b27 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -31,7 +31,7 @@ class XmlArticle extends CakeTestModel { /** * name property * - * @var string 'Article' + * @var string */ public $name = 'Article'; @@ -58,7 +58,7 @@ class XmlUser extends CakeTestModel { /** * name property * - * @var string 'User' + * @var string */ public $name = 'User'; diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 0791ea6fd..836650c04 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -181,7 +181,7 @@ class ContactNonStandardPk extends Contact { /** * primaryKey property * - * @var string 'pk' + * @var string */ public $primaryKey = 'pk'; diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 673703583..ee3243972 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -40,7 +40,7 @@ class TheHtmlTestController extends Controller { /** * name property * - * @var string 'TheTest' + * @var string */ public $name = 'TheTest'; diff --git a/lib/Cake/Test/Case/View/ScaffoldViewTest.php b/lib/Cake/Test/Case/View/ScaffoldViewTest.php index edf0c3742..53e02c0cc 100644 --- a/lib/Cake/Test/Case/View/ScaffoldViewTest.php +++ b/lib/Cake/Test/Case/View/ScaffoldViewTest.php @@ -54,7 +54,7 @@ class ScaffoldViewMockController extends Controller { /** * name property * - * @var string 'ScaffoldMock' + * @var string */ public $name = 'ScaffoldMock'; diff --git a/lib/Cake/Test/Case/View/ThemeViewTest.php b/lib/Cake/Test/Case/View/ThemeViewTest.php index 245465525..1dba0f28d 100644 --- a/lib/Cake/Test/Case/View/ThemeViewTest.php +++ b/lib/Cake/Test/Case/View/ThemeViewTest.php @@ -32,7 +32,7 @@ class ThemePosts2Controller extends Controller { /** * name property * - * @var string 'ThemePosts' + * @var string */ public $name = 'ThemePosts'; diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index ec1a9b066..ea3aedd5c 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -35,7 +35,7 @@ class ViewPostsController extends Controller { /** * name property * - * @var string 'Posts' + * @var string */ public $name = 'Posts'; @@ -78,13 +78,6 @@ class ViewPostsController extends Controller { */ class ThemePostsController extends Controller { -/** - * name property - * - * @var string 'ThemePosts' - */ - public $name = 'ThemePosts'; - public $theme = null; /** @@ -200,7 +193,7 @@ class TestAfterHelper extends Helper { /** * property property * - * @var string '' + * @var string */ public $property = ''; From 0946a7799af54c1855ed36bc5b4539f794b28d19 Mon Sep 17 00:00:00 2001 From: Rik van der Heijden Date: Sat, 8 Jun 2013 10:25:28 +0200 Subject: [PATCH 13/16] Fix locale for CakeTimeTest when configured different locale in app --- lib/Cake/Test/Case/Utility/CakeTimeTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Test/Case/Utility/CakeTimeTest.php b/lib/Cake/Test/Case/Utility/CakeTimeTest.php index a0b743835..c9bf89815 100644 --- a/lib/Cake/Test/Case/Utility/CakeTimeTest.php +++ b/lib/Cake/Test/Case/Utility/CakeTimeTest.php @@ -42,6 +42,7 @@ class CakeTimeTest extends CakeTestCase { public function setUp() { $this->Time = new CakeTime(); $this->_systemTimezoneIdentifier = date_default_timezone_get(); + Configure::write('Config.language', 'eng'); } /** From e527eab5aa92caabc03d722d5eaf2b60744209b7 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 8 Jun 2013 09:47:46 -0400 Subject: [PATCH 14/16] Add missing call to parent::setUp() --- lib/Cake/Test/Case/Utility/CakeTimeTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Test/Case/Utility/CakeTimeTest.php b/lib/Cake/Test/Case/Utility/CakeTimeTest.php index c9bf89815..1ea6d7dac 100644 --- a/lib/Cake/Test/Case/Utility/CakeTimeTest.php +++ b/lib/Cake/Test/Case/Utility/CakeTimeTest.php @@ -40,6 +40,7 @@ class CakeTimeTest extends CakeTestCase { * @return void */ public function setUp() { + parent::setUp(); $this->Time = new CakeTime(); $this->_systemTimezoneIdentifier = date_default_timezone_get(); Configure::write('Config.language', 'eng'); From 0cfdb87cdfe0eccddac1071fb81d651e3de56a90 Mon Sep 17 00:00:00 2001 From: Aymeric Derbois Date: Sun, 9 Jun 2013 00:48:59 +0200 Subject: [PATCH 15/16] Fix a problem of tag values which is not taken into account (when equal to zero) when passing an array to XML object. --- lib/Cake/Test/Case/Utility/XmlTest.php | 13 +++++++++++++ lib/Cake/Utility/Xml.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index 46dac3b27..7896ed4c9 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -375,6 +375,19 @@ XML; $obj = Xml::fromArray($xml, 'attributes'); $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>defect'; $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); + + $xml = array( + 'tag' => array( + '@' => 0, + '@test' => 'A test' + ) + ); + $obj = Xml::fromArray($xml); + $xmlText = << +0 +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); } /** diff --git a/lib/Cake/Utility/Xml.php b/lib/Cake/Utility/Xml.php index 862f6c1d4..88d4e19a0 100644 --- a/lib/Cake/Utility/Xml.php +++ b/lib/Cake/Utility/Xml.php @@ -310,7 +310,7 @@ class Xml { } $child = $dom->createElement($key); - if ($childValue) { + if (!is_null($childValue)) { $child->appendChild($dom->createTextNode($childValue)); } if ($childNS) { From e5b1182a0dd30e97a5ffb07730cfb5930faf371a Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 8 Jun 2013 22:41:46 -0400 Subject: [PATCH 16/16] Only delete files that have a matching group + prefix. Fixes #3873 --- lib/Cake/Cache/Engine/FileEngine.php | 3 +- .../Test/Case/Cache/Engine/FileEngineTest.php | 29 ++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index 1695dea16..d32f65191 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -365,7 +365,8 @@ class FileEngine extends CacheEngine { $contents = new RecursiveIteratorIterator($directoryIterator, RecursiveIteratorIterator::CHILD_FIRST); foreach ($contents as $object) { $containsGroup = strpos($object->getPathName(), DS . $group . DS) !== false; - if ($object->isFile() && $containsGroup) { + $hasPrefix = strpos($object->getBaseName(), $this->settings['prefix']) === 0; + if ($object->isFile() && $containsGroup && $hasPrefix) { unlink($object->getPathName()); } } diff --git a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php index 810b65fc2..e57e94212 100644 --- a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php @@ -443,7 +443,11 @@ class FileEngineTest extends CakeTestCase { * @return void */ public function testGroupDelete() { - Cache::config('file_groups', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_a', 'group_b'))); + Cache::config('file_groups', array( + 'engine' => 'File', + 'duration' => 3600, + 'groups' => array('group_a', 'group_b') + )); $this->assertTrue(Cache::write('test_groups', 'value', 'file_groups')); $this->assertEquals('value', Cache::read('test_groups', 'file_groups')); $this->assertTrue(Cache::delete('test_groups', 'file_groups')); @@ -459,24 +463,29 @@ class FileEngineTest extends CakeTestCase { public function testGroupClear() { Cache::config('file_groups', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_a', 'group_b'))); Cache::config('file_groups2', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_b'))); - Cache::config('file_groups3', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_a'))); + Cache::config('file_groups3', array( + 'engine' => 'File', + 'duration' => 3600, + 'groups' => array('group_b'), + 'prefix' => 'leading_', + )); $this->assertTrue(Cache::write('test_groups', 'value', 'file_groups')); - $this->assertTrue(Cache::write('test_groups2', 'value', 'file_groups2')); - $this->assertTrue(Cache::write('test_groups3', 'value', 'file_groups3')); + $this->assertTrue(Cache::write('test_groups2', 'value 2', 'file_groups2')); + $this->assertTrue(Cache::write('test_groups3', 'value 3', 'file_groups3')); - $this->assertTrue(Cache::clearGroup('group_a', 'file_groups')); + $this->assertTrue(Cache::clearGroup('group_b', 'file_groups')); $this->assertFalse(Cache::read('test_groups', 'file_groups')); - $this->assertEquals('value', Cache::read('test_groups2', 'file_groups2')); - $this->assertFalse(Cache::read('test_groups3', 'file_groups3')); + $this->assertFalse(Cache::read('test_groups2', 'file_groups2')); + $this->assertEquals('value 3', Cache::read('test_groups3', 'file_groups3')); $this->assertTrue(Cache::write('test_groups4', 'value', 'file_groups')); - $this->assertTrue(Cache::write('test_groups5', 'value', 'file_groups2')); - $this->assertTrue(Cache::write('test_groups6', 'value', 'file_groups3')); + $this->assertTrue(Cache::write('test_groups5', 'value 2', 'file_groups2')); + $this->assertTrue(Cache::write('test_groups6', 'value 3', 'file_groups3')); $this->assertTrue(Cache::clearGroup('group_b', 'file_groups')); $this->assertFalse(Cache::read('test_groups4', 'file_groups')); $this->assertFalse(Cache::read('test_groups5', 'file_groups2')); - $this->assertEquals('value', Cache::read('test_groups6', 'file_groups3')); + $this->assertEquals('value 3', Cache::read('test_groups6', 'file_groups3')); } }