Skip to content

Commit

Permalink
Merge branch '2.6' into 3.0-merge
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ADmad committed Jul 3, 2014
2 parents 99d8d42 + 2bcd817 commit 4275717
Show file tree
Hide file tree
Showing 36 changed files with 74 additions and 81 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/Engine/ApcEngine.php
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
1 change: 0 additions & 1 deletion 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
9 changes: 7 additions & 2 deletions 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)
*
Expand Down Expand Up @@ -69,6 +67,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
*
Expand Down
2 changes: 0 additions & 2 deletions 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)
*
Expand Down
25 changes: 13 additions & 12 deletions src/Network/Email/Email.php
Expand Up @@ -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.
Expand Down Expand Up @@ -530,7 +532,7 @@ public function addBcc($email, $name = null) {
* Charset setter/getter
*
* @param string $charset Character set.
* @return string $this->charset
* @return string this->charset
*/
public function charset($charset = null) {
if ($charset === null) {
Expand All @@ -547,7 +549,7 @@ public function charset($charset = null) {
* HeaderCharset setter/getter
*
* @param string $charset Character set.
* @return string $this->charset
* @return string this->charset
*/
public function headerCharset($charset = null) {
if ($charset === null) {
Expand All @@ -562,8 +564,8 @@ public function headerCharset($charset = null) {
* @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;
Expand Down Expand Up @@ -609,13 +611,12 @@ protected function _setEmail($varName, $email, $name) {
* @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));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Request.php
Expand Up @@ -611,7 +611,7 @@ public function is($type) {
*
* @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));
Expand Down
4 changes: 2 additions & 2 deletions src/Network/Response.php
Expand Up @@ -1142,7 +1142,7 @@ public function length($bytes = null) {
* 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) {
Expand Down Expand Up @@ -1288,7 +1288,7 @@ public function cors(Request $request, $allowedDomains, $allowedMethods = array(
/**
* 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
*/
Expand Down
1 change: 1 addition & 0 deletions src/Routing/Route/RedirectRoute.php
Expand Up @@ -107,4 +107,5 @@ public function parse($url) {
public function match(array $url, array $context = array()) {
return false;
}

}
1 change: 0 additions & 1 deletion 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)
*
Expand Down
1 change: 0 additions & 1 deletion 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)
*
Expand Down
1 change: 0 additions & 1 deletion 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)
*
Expand Down
1 change: 0 additions & 1 deletion 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)
*
Expand Down
1 change: 0 additions & 1 deletion 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)
*
Expand Down
8 changes: 4 additions & 4 deletions src/TestSuite/TestCase.php
Expand Up @@ -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 = '') {
Expand Down Expand Up @@ -527,9 +527,9 @@ protected function skipUnless($condition, $message = '') {
/**
* 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
*/
Expand Down
11 changes: 10 additions & 1 deletion src/Utility/Inflector.php
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/Validation/Validation.php
Expand Up @@ -415,7 +415,7 @@ public static function boolean($check) {
* - 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
Expand Down
1 change: 0 additions & 1 deletion src/View/View.php
Expand Up @@ -91,7 +91,6 @@ class View {
/**
* Name of the controller that created the View if any.
*
* @see Controller::$name
* @var string
*/
public $name = null;
Expand Down
4 changes: 0 additions & 4 deletions 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)
*
Expand Down
16 changes: 0 additions & 16 deletions tests/TestCase/Console/Command/Task/FixtureTaskTest.php
Expand Up @@ -202,22 +202,6 @@ public function testMainWithTableOption() {
$this->Task->main('article');
}

/**
* test that execute passes runs bake depending with named model.
*
* @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.
*
Expand Down
27 changes: 27 additions & 0 deletions tests/TestCase/Console/ConsoleErrorHandlerTest.php
Expand Up @@ -135,4 +135,31 @@ public function testError500Exception() {
$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);
}

}
1 change: 0 additions & 1 deletion 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)
*
Expand Down

0 comments on commit 4275717

Please sign in to comment.