Browse Source

Merge branch '2.6' into 3.0-merge

Conflicts:
	.travis.yml
	app/Config/Schema/db_acl.php
	app/Config/Schema/i18n.php
	app/Config/acl.php
	app/Config/core.php
	app/View/Layouts/default.ctp
	app/View/Layouts/error.ctp
	app/View/Layouts/flash.ctp
	app/View/Pages/home.ctp
	lib/Cake/Cache/Cache.php
	lib/Cake/Cache/CacheEngine.php
	lib/Cake/Cache/Engine/MemcacheEngine.php
	lib/Cake/Cache/Engine/MemcachedEngine.php
	lib/Cake/Cache/Engine/RedisEngine.php
	lib/Cake/Console/Command/AclShell.php
	lib/Cake/Console/Command/ConsoleShell.php
	lib/Cake/Console/Command/SchemaShell.php
	lib/Cake/Console/Command/Task/BakeTask.php
	lib/Cake/Console/Command/Task/ControllerTask.php
	lib/Cake/Console/Command/Task/DbConfigTask.php
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Console/Command/Task/PluginTask.php
	lib/Cake/Console/Command/Task/ProjectTask.php
	lib/Cake/Console/Command/Task/TestTask.php
	lib/Cake/Console/Command/Task/ViewTask.php
	lib/Cake/Console/Command/TestShell.php
	lib/Cake/Console/ConsoleErrorHandler.php
	lib/Cake/Console/Shell.php
	lib/Cake/Console/ShellDispatcher.php
	lib/Cake/Console/Templates/default/views/form.ctp
	lib/Cake/Console/Templates/default/views/index.ctp
	lib/Cake/Console/Templates/default/views/view.ctp
	lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
	lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
	lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
	lib/Cake/Console/Templates/skel/Config/core.php
	lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
	lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
	lib/Cake/Console/Templates/skel/View/Pages/home.ctp
	lib/Cake/Console/Templates/skel/index.php
	lib/Cake/Controller/Component.php
	lib/Cake/Controller/Component/Acl/AclInterface.php
	lib/Cake/Controller/Component/Acl/DbAcl.php
	lib/Cake/Controller/Component/Acl/IniAcl.php
	lib/Cake/Controller/Component/Acl/PhpAcl.php
	lib/Cake/Controller/Component/AclComponent.php
	lib/Cake/Controller/Component/Auth/ActionsAuthorize.php
	lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
	lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
	lib/Cake/Controller/Component/Auth/CrudAuthorize.php
	lib/Cake/Controller/Component/Auth/FormAuthenticate.php
	lib/Cake/Controller/Component/AuthComponent.php
	lib/Cake/Controller/Component/CookieComponent.php
	lib/Cake/Controller/Component/EmailComponent.php
	lib/Cake/Controller/Component/SecurityComponent.php
	lib/Cake/Controller/Controller.php
	lib/Cake/Controller/Scaffold.php
	lib/Cake/Core/App.php
	lib/Cake/Core/CakePlugin.php
	lib/Cake/Core/Configure.php
	lib/Cake/Core/Object.php
	lib/Cake/Error/ErrorHandler.php
	lib/Cake/Error/exceptions.php
	lib/Cake/I18n/Multibyte.php
	lib/Cake/Log/CakeLog.php
	lib/Cake/Model/AclNode.php
	lib/Cake/Model/Behavior/AclBehavior.php
	lib/Cake/Model/Behavior/ContainableBehavior.php
	lib/Cake/Model/Behavior/TranslateBehavior.php
	lib/Cake/Model/Behavior/TreeBehavior.php
	lib/Cake/Model/BehaviorCollection.php
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Model/ConnectionManager.php
	lib/Cake/Model/Datasource/CakeSession.php
	lib/Cake/Model/Datasource/DataSource.php
	lib/Cake/Model/Datasource/Database/Mysql.php
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Model/Datasource/Database/Sqlite.php
	lib/Cake/Model/Datasource/Database/Sqlserver.php
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Model/Datasource/Session/CacheSession.php
	lib/Cake/Model/Datasource/Session/CakeSessionHandlerInterface.php
	lib/Cake/Model/Datasource/Session/DatabaseSession.php
	lib/Cake/Model/Model.php
	lib/Cake/Model/ModelBehavior.php
	lib/Cake/Model/ModelValidator.php
	lib/Cake/Model/Permission.php
	lib/Cake/Model/Validator/CakeValidationRule.php
	lib/Cake/Model/Validator/CakeValidationSet.php
	lib/Cake/Network/Http/DigestAuthentication.php
	lib/Cake/Network/Http/HttpSocket.php
	lib/Cake/Network/Http/HttpSocketResponse.php
	lib/Cake/Routing/Dispatcher.php
	lib/Cake/Routing/DispatcherFilter.php
	lib/Cake/Routing/Filter/AssetDispatcher.php
	lib/Cake/Routing/Router.php
	lib/Cake/Test/Case/Console/ShellTest.php
	lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php
	lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
	lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
	lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php
	lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php
	lib/Cake/Test/Case/Controller/ComponentTest.php
	lib/Cake/Test/Case/Controller/ControllerTest.php
	lib/Cake/Test/Case/Controller/ScaffoldTest.php
	lib/Cake/Test/Case/Model/AclNodeTest.php
	lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
	lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php
	lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
	lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php
	lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php
	lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
	lib/Cake/Test/Case/Model/Datasource/DataSourceTest.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
	lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
	lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php
	lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php
	lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
	lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php
	lib/Cake/Test/Case/Model/ModelIntegrationTest.php
	lib/Cake/Test/Case/Model/ModelTestBase.php
	lib/Cake/Test/Case/Model/Validator/CakeValidationRuleTest.php
	lib/Cake/Test/Case/Model/models.php
	lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php
	lib/Cake/Test/Case/Network/Http/HttpResponseTest.php
	lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
	lib/Cake/Test/Case/Routing/DispatcherTest.php
	lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php
	lib/Cake/Test/Case/Utility/ClassRegistryTest.php
	lib/Cake/Test/Case/Utility/SanitizeTest.php
	lib/Cake/Test/Case/View/Helper/FormHelperTest.php
	lib/Cake/Test/Case/View/HelperTest.php
	lib/Cake/Test/Fixture/ArmorsPlayerFixture.php
	lib/Cake/Test/Fixture/JoinABFixture.php
	lib/Cake/Test/Fixture/JoinACFixture.php
	lib/Cake/Test/Fixture/TranslateFixture.php
	lib/Cake/Test/test_app/Plugin/TestPlugin/Model/TestPluginAuthUser.php
	lib/Cake/TestSuite/CakeTestSuiteCommand.php
	lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
	lib/Cake/TestSuite/ControllerTestCase.php
	lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
	lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
	lib/Cake/TestSuite/Fixture/CakeTestFixture.php
	lib/Cake/TestSuite/Fixture/CakeTestModel.php
	lib/Cake/TestSuite/Reporter/CakeBaseReporter.php
	lib/Cake/Utility/CakeTime.php
	lib/Cake/Utility/ClassRegistry.php
	lib/Cake/Utility/ObjectCollection.php
	lib/Cake/Utility/Set.php
	lib/Cake/View/Errors/fatal_error.ctp
	lib/Cake/View/Errors/missing_action.ctp
	lib/Cake/View/Errors/missing_behavior.ctp
	lib/Cake/View/Errors/missing_component.ctp
	lib/Cake/View/Errors/missing_controller.ctp
	lib/Cake/View/Errors/missing_database.ctp
	lib/Cake/View/Errors/missing_datasource_config.ctp
	lib/Cake/View/Errors/missing_helper.ctp
	lib/Cake/View/Errors/missing_plugin.ctp
	lib/Cake/View/Errors/missing_table.ctp
	lib/Cake/View/Errors/private_action.ctp
	lib/Cake/View/Errors/scaffold_error.ctp
	lib/Cake/View/Helper.php
	lib/Cake/View/Helper/FormHelper.php
	lib/Cake/View/Helper/JsBaseEngineHelper.php
	lib/Cake/View/Helper/JsHelper.php
	lib/Cake/View/Helper/PaginatorHelper.php
	lib/Cake/View/Helper/PrototypeEngineHelper.php
	lib/Cake/View/Helper/TimeHelper.php
	lib/Cake/View/HelperCollection.php
	lib/Cake/View/Scaffolds/form.ctp
	lib/Cake/View/Scaffolds/index.ctp
	lib/Cake/View/Scaffolds/view.ctp
	lib/Cake/bootstrap.php
	src/Auth/BaseAuthorize.php
	src/Auth/ControllerAuthorize.php
	src/Cache/Engine/ApcEngine.php
	src/Cache/Engine/FileEngine.php
	src/Cache/Engine/WincacheEngine.php
	src/Cache/Engine/XcacheEngine.php
	src/Console/Command/Task/ExtractTask.php
	src/Console/ConsoleInputArgument.php
	src/Console/ConsoleInputOption.php
	src/Console/HelpFormatter.php
	src/Controller/Component/RequestHandlerComponent.php
	src/Controller/Component/SessionComponent.php
	src/Database/Exception.php
	src/Event/EventListener.php
	src/I18n/I18n.php
	src/Log/Engine/ConsoleLog.php
	src/Log/Engine/FileLog.php
	src/Log/Engine/SyslogLog.php
	src/Network/Email/Email.php
	src/Network/Request.php
	src/Network/Response.php
	src/Network/Socket.php
	src/Routing/Route/RedirectRoute.php
	src/Routing/Route/Route.php
	src/Template/Error/fatal_error.ctp
	src/Template/Error/missing_connection.ctp
	src/Template/Error/missing_datasource.ctp
	src/Template/Error/missing_view.ctp
	src/Template/Error/pdo_error.ctp
	src/TestSuite/TestCase.php
	src/Utility/File.php
	src/Utility/Folder.php
	src/Utility/Number.php
	src/Utility/Security.php
	src/Utility/String.php
	src/Validation/Validation.php
	src/View/Helper/HtmlHelper.php
	src/View/Helper/NumberHelper.php
	src/View/Helper/RssHelper.php
	src/View/Helper/SessionHelper.php
	src/View/View.php
	src/bootstrap.php
	tests/Fixture/ArticleFixture.php
	tests/TestCase/Console/Command/Task/FixtureTaskTest.php
	tests/TestCase/Controller/Component/RequestHandlerComponentTest.php
	tests/TestCase/Log/Engine/SyslogLogTest.php
	tests/TestCase/Network/Email/EmailTest.php
	tests/TestCase/Network/RequestTest.php
	tests/TestCase/Utility/SecurityTest.php
	tests/TestCase/Validation/ValidationTest.php
	tests/TestCase/View/Helper/HtmlHelperTest.php
	tests/test_app/Plugin/TestPlugin/src/Routing/Filter/TestDispatcherFilter.php
	tests/test_app/TestApp/Template/Error/error400.ctp
	tests/test_app/TestApp/Template/Error/error500.ctp
	tests/test_app/TestApp/View/Helper/BananaHelper.php
ADmad 11 years ago
parent
commit
42757171c5
36 changed files with 74 additions and 81 deletions
  1. 0 1
      .travis.yml
  2. 1 1
      src/Cache/Engine/ApcEngine.php
  3. 0 2
      src/Console/Command/Task/ExtractTask.php
  4. 0 2
      src/Console/ConsoleInputArgument.php
  5. 0 2
      src/Console/ConsoleInputOption.php
  6. 0 2
      src/Console/HelpFormatter.php
  7. 0 2
      src/Controller/Component/SessionComponent.php
  8. 0 2
      src/Database/Exception.php
  9. 0 1
      src/Event/EventListener.php
  10. 0 2
      src/I18n/I18n.php
  11. 0 2
      src/Log/Engine/ConsoleLog.php
  12. 7 2
      src/Log/Engine/FileLog.php
  13. 0 2
      src/Log/Engine/SyslogLog.php
  14. 13 12
      src/Network/Email/Email.php
  15. 1 1
      src/Network/Request.php
  16. 2 2
      src/Network/Response.php
  17. 1 0
      src/Routing/Route/RedirectRoute.php
  18. 0 1
      src/Template/Error/fatal_error.ctp
  19. 0 1
      src/Template/Error/missing_connection.ctp
  20. 0 1
      src/Template/Error/missing_datasource.ctp
  21. 0 1
      src/Template/Error/missing_view.ctp
  22. 0 1
      src/Template/Error/pdo_error.ctp
  23. 4 4
      src/TestSuite/TestCase.php
  24. 10 1
      src/Utility/Inflector.php
  25. 1 1
      src/Validation/Validation.php
  26. 0 1
      src/View/View.php
  27. 0 4
      src/bootstrap.php
  28. 0 16
      tests/TestCase/Console/Command/Task/FixtureTaskTest.php
  29. 27 0
      tests/TestCase/Console/ConsoleErrorHandlerTest.php
  30. 0 1
      tests/TestCase/Log/Engine/SyslogLogTest.php
  31. 6 6
      tests/TestCase/Network/Email/EmailTest.php
  32. 1 0
      tests/TestCase/Utility/InflectorTest.php
  33. 0 1
      tests/test_app/Plugin/TestPlugin/src/Routing/Filter/TestDispatcherFilter.php
  34. 0 1
      tests/test_app/TestApp/Template/Error/error400.ctp
  35. 0 1
      tests/test_app/TestApp/Template/Error/error500.ctp
  36. 0 1
      tests/test_app/TestApp/View/Helper/BananaHelper.php

+ 0 - 1
.travis.yml

@@ -28,7 +28,6 @@ matrix:
     - php: hhvm-nightly
       env: HHVM=1 DB=mysql db_class='Cake\Database\Driver\Mysql' db_dsn='mysql:host=0.0.0.0;dbname=cakephp_test' db_database='cakephp_test' db_login='travis' db_password=''
 
-
 before_script:
   - composer self-update
   - composer install --prefer-source --no-interaction --dev

+ 1 - 1
src/Cache/Engine/ApcEngine.php

@@ -14,9 +14,9 @@
  */
 namespace Cake\Cache\Engine;
 
+use APCIterator;
 use Cake\Cache\CacheEngine;
 use Cake\Utility\Inflector;
-use APCIterator;
 
 /**
  * APC storage engine for cache

+ 0 - 2
src/Console/Command/Task/ExtractTask.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * Language string extractor
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/Console/ConsoleInputArgument.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * ConsoleArgumentOption file
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/Console/ConsoleInputOption.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * ConsoleInputOption file
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/Console/HelpFormatter.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * HelpFormatter
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/Controller/Component/SessionComponent.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * SessionComponent. Provides access to Sessions from the Controller layer
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/Database/Exception.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * Database Exception
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
src/Event/EventListener.php

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/I18n/I18n.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * Internationalization
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 2
src/Log/Engine/ConsoleLog.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * Console Logging
- *
  * CakePHP(tm) :  Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 7 - 2
src/Log/Engine/FileLog.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * File Storage stream for Logging
- *
  * CakePHP(tm) :  Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
@@ -70,6 +68,13 @@ class FileLog extends BaseLog {
 	protected $_file = null;
 
 /**
+ * Max file size, used for log file rotation.
+ *
+ * @var int
+ */
+	protected $_size = null;
+
+/**
  * Sets protected properties based on config provided
  *
  * @param array $config Configuration array

+ 0 - 2
src/Log/Engine/SyslogLog.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * Syslog logger engine for CakePHP
- *
  * CakePHP(tm) :  Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 13 - 12
src/Network/Email/Email.php

@@ -329,11 +329,13 @@ class Email {
 
 /**
  * Regex for email validation
- * If null, filter_var() will be used.
+ *
+ * If null, filter_var() will be used. Use the emailPattern() method
+ * to set a custom pattern.'
  *
  * @var string
  */
-	protected $_emailPattern = null;
+	protected $_emailPattern = '/^((?:[\p{L}0-9!#$%&\'*+\/=?^_`{|}~-]+)*@[\p{L}0-9-.]+)$/ui';
 
 /**
  * The class name used for email configuration.
@@ -530,7 +532,7 @@ class Email {
  * Charset setter/getter
  *
  * @param string $charset Character set.
- * @return string $this->charset
+ * @return string this->charset
  */
 	public function charset($charset = null) {
 		if ($charset === null) {
@@ -547,7 +549,7 @@ class Email {
  * HeaderCharset setter/getter
  *
  * @param string $charset Character set.
- * @return string $this->charset
+ * @return string this->charset
  */
 	public function headerCharset($charset = null) {
 		if ($charset === null) {
@@ -562,8 +564,8 @@ class Email {
  * @param string $regex for email address validation
  * @return string|$this
  */
-	public function emailPattern($regex = null) {
-		if ($regex === null) {
+	public function emailPattern($regex = false) {
+		if ($regex === false) {
 			return $this->_emailPattern;
 		}
 		$this->_emailPattern = $regex;
@@ -609,13 +611,12 @@ class Email {
  * @throws \Cake\Network\Error\SocketException If email address does not validate
  */
 	protected function _validateEmail($email) {
-		$valid = (($this->_emailPattern !== null &&
-			preg_match($this->_emailPattern, $email)) ||
-			filter_var($email, FILTER_VALIDATE_EMAIL)
-		);
-		if (!$valid) {
-			throw new Error\SocketException(sprintf('Invalid email: "%s"', $email));
+		if ($this->_emailPattern === null && filter_var($email, FILTER_VALIDATE_EMAIL)) {
+			return;
+		} elseif (preg_match($this->_emailPattern, $email)) {
+			return;
 		}
+		throw new Error\SocketException(__d('cake_dev', 'Invalid email: "%s"', $email));
 	}
 
 /**

+ 1 - 1
src/Network/Request.php

@@ -611,7 +611,7 @@ class Request implements \ArrayAccess {
  *
  * @param array $types The types to check.
  * @return bool Success.
- * @see Request::is()
+ * @see \Cake\Network\Request::is()
  */
 	public function isAll(array $types) {
 		$result = array_filter(array_map(array($this, 'is'), $types));

+ 2 - 2
src/Network/Response.php

@@ -1142,7 +1142,7 @@ class Response {
  * the Last-Modified etag response header before calling this method. Otherwise
  * a comparison will not be possible.
  *
- * @param Request $request Request object
+ * @param \Cake\Network\Request $request Request object
  * @return bool whether the response was marked as not modified or not.
  */
 	public function checkNotModified(Request $request) {
@@ -1288,7 +1288,7 @@ class Response {
 /**
  * Normalize the origin to regular expressions and put in an array format
  *
- * @param array $domains Domain names.
+ * @param array $domains Domain names to normalize.
  * @param bool $requestIsSSL Whether it's a SSL request.
  * @return array
  */

+ 1 - 0
src/Routing/Route/RedirectRoute.php

@@ -107,4 +107,5 @@ class RedirectRoute extends Route {
 	public function match(array $url, array $context = array()) {
 		return false;
 	}
+
 }

+ 0 - 1
src/Template/Error/fatal_error.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
src/Template/Error/missing_connection.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
src/Template/Error/missing_datasource.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
src/Template/Error/missing_view.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
src/Template/Error/pdo_error.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 4 - 4
src/TestSuite/TestCase.php

@@ -68,8 +68,8 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 /**
  * Overrides SimpleTestCase::skipIf to provide a boolean return value
  *
- * @param bool $shouldSkip
- * @param string $message
+ * @param bool $shouldSkip Whether or not the test should be skipped.
+ * @param string $message The message to display.
  * @return bool
  */
 	public function skipIf($shouldSkip, $message = '') {
@@ -527,9 +527,9 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 /**
  * Mock a model, maintain fixtures and table association
  *
- * @param string $model The model to get a mock for.
+ * @param string $alias The model to get a mock for.
  * @param mixed $methods The list of methods to mock
- * @param array $config The config data for the mock's constructor.
+ * @param array $options The config data for the mock's constructor.
  * @throws \Cake\ORM\Error\MissingTableClassException
  * @return Model
  */

+ 10 - 1
src/Utility/Inflector.php

@@ -55,7 +55,16 @@ class Inflector {
 			'/$/' => 's',
 		),
 		'uninflected' => array(
-			'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people', 'feedback'
+			'.*[nrlm]ese',
+			'.*deer',
+			'.*fish',
+			'.*measles',
+			'.*ois',
+			'.*pox',
+			'.*sheep',
+			'people',
+			'feedback',
+			'stadia'
 		),
 		'irregular' => array(
 			'atlas' => 'atlases',

+ 1 - 1
src/Validation/Validation.php

@@ -415,7 +415,7 @@ class Validation {
  * - true => Any number of decimal places greater than 0, or a float|double. The '.' is required.
  * - 1..N => Exactly that many number of decimal places. The '.' is required.
  *
- * @param float $check The value the test for decimal
+ * @param float $check The value the test for decimal.
  * @param int $places Decimal places.
  * @param string $regex If a custom regular expression is used, this is the only validation that will occur.
  * @return bool Success

+ 0 - 1
src/View/View.php

@@ -91,7 +91,6 @@ class View {
 /**
  * Name of the controller that created the View if any.
  *
- * @see Controller::$name
  * @var string
  */
 	public $name = null;

+ 0 - 4
src/bootstrap.php

@@ -1,9 +1,5 @@
 <?php
 /**
- * Basic Cake functionality.
- *
- * Handles loading of core files needed on every request
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 16
tests/TestCase/Console/Command/Task/FixtureTaskTest.php

@@ -207,22 +207,6 @@ class FixtureTaskTest extends TestCase {
  *
  * @return void
  */
-	public function testMainWithNamedModel() {
-		$this->Task->connection = 'test';
-		$filename = $this->_normalizePath(ROOT . '/Test/Fixture/ArticleFixture.php');
-
-		$this->Task->expects($this->at(0))
-			->method('createFile')
-			->with($filename, $this->stringContains('class ArticleFixture'));
-
-		$this->Task->main('article');
-	}
-
-/**
- * test that execute passes runs bake depending with named model.
- *
- * @return void
- */
 	public function testMainWithPluginModel() {
 		$this->Task->connection = 'test';
 		$filename = $this->_normalizePath(TEST_APP . 'Plugin/TestPlugin/tests/Fixture/ArticleFixture.php');

+ 27 - 0
tests/TestCase/Console/ConsoleErrorHandlerTest.php

@@ -135,4 +135,31 @@ class ConsoleErrorHandlerTest extends TestCase {
 		$this->Error->handleException($exception);
 	}
 
+/**
+ * test a exception with non-integer code
+ *
+ * @return void
+ */
+	public function testNonIntegerExceptionCode() {
+		if (PHP_VERSION_ID < 50300) {
+			$this->markTestSkipped('ReflectionProperty::setAccessible() is available since 5.3');
+		}
+
+		$exception = new Exception('Non-integer exception code');
+
+		$class = new ReflectionClass('Exception');
+		$property = $class->getProperty('code');
+		$property->setAccessible(true);
+		$property->setValue($exception, '42S22');
+
+		ConsoleErrorHandler::$stderr->expects($this->once())->method('write')
+			->with($this->stringContains('Non-integer exception code'));
+
+		$this->Error->expects($this->once())
+			->method('_stop')
+			->with(1);
+
+		$this->Error->handleException($exception);
+	}
+
 }

+ 0 - 1
tests/TestCase/Log/Engine/SyslogLogTest.php

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 6 - 6
tests/TestCase/Network/Email/EmailTest.php

@@ -196,12 +196,16 @@ class EmailTest extends TestCase {
 		$this->assertSame($this->CakeEmail->to(), $expected);
 
 		$list = array(
+			'root@localhost' => 'root',
+			'bjørn@hammeröath.com' => 'Bjorn',
 			'cake@cakephp.org' => 'Cake PHP',
 			'cake-php@googlegroups.com' => 'Cake Groups',
 			'root@cakephp.org'
 		);
 		$this->CakeEmail->to($list);
 		$expected = array(
+			'root@localhost' => 'root',
+			'bjørn@hammeröath.com' => 'Bjorn',
 			'cake@cakephp.org' => 'Cake PHP',
 			'cake-php@googlegroups.com' => 'Cake Groups',
 			'root@cakephp.org' => 'root@cakephp.org'
@@ -212,6 +216,8 @@ class EmailTest extends TestCase {
 		$this->CakeEmail->addTo('mark_story@cakephp.org', 'Mark Story');
 		$result = $this->CakeEmail->addTo(array('phpnut@cakephp.org' => 'PhpNut', 'jose_zap@cakephp.org'));
 		$expected = array(
+			'root@localhost' => 'root',
+			'bjørn@hammeröath.com' => 'Bjorn',
 			'cake@cakephp.org' => 'Cake PHP',
 			'cake-php@googlegroups.com' => 'Cake Groups',
 			'root@cakephp.org' => 'root@cakephp.org',
@@ -222,9 +228,6 @@ class EmailTest extends TestCase {
 		);
 		$this->assertSame($this->CakeEmail->to(), $expected);
 		$this->assertSame($this->CakeEmail, $result);
-
-		$this->setExpectedException('Cake\Network\Error\SocketException');
-		$this->CakeEmail->to(array('cake@localhost', 'CakePHP'));
 	}
 
 /**
@@ -238,8 +241,6 @@ class EmailTest extends TestCase {
 			array(''),
 			array('string'),
 			array('<tag>'),
-			array('some@one-whereis'),
-			array('wrong@key' => 'Name'),
 			array(array('ok@cakephp.org', 1.0, '', 'string'))
 		);
 	}
@@ -273,7 +274,6 @@ class EmailTest extends TestCase {
  */
 	public function testEmailPattern() {
 		$regex = '/.+@.+\..+/i';
-		$this->assertNull($this->CakeEmail->emailPattern());
 		$this->assertSame($regex, $this->CakeEmail->emailPattern($regex)->emailPattern());
 	}
 

+ 1 - 0
tests/TestCase/Utility/InflectorTest.php

@@ -238,6 +238,7 @@ class InflectorTest extends TestCase {
 		$this->assertEquals(Inflector::pluralize('curve'), 'curves');
 		$this->assertEquals(Inflector::pluralize('body_curve'), 'body_curves');
 		$this->assertEquals(Inflector::pluralize('metadata'), 'metadata');
+		$this->assertEquals(Inflector::pluralize('stadia'), 'stadia');
 		$this->assertEquals(Inflector::pluralize(''), '');
 	}
 

+ 0 - 1
tests/test_app/Plugin/TestPlugin/src/Routing/Filter/TestDispatcherFilter.php

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
tests/test_app/TestApp/Template/Error/error400.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
tests/test_app/TestApp/Template/Error/error500.ctp

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *

+ 0 - 1
tests/test_app/TestApp/View/Helper/BananaHelper.php

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *