diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php index dacdcbd8c15..a014f418e0c 100644 --- a/lib/Cake/Console/Command/UpgradeShell.php +++ b/lib/Cake/Console/Command/UpgradeShell.php @@ -20,7 +20,7 @@ use Cake\Utility\Inflector; /** - * A shell class to help developers upgrade applications to CakePHP 2.0 + * A shell class to help developers upgrade applications to CakePHP 3.0 * * @package Cake.Console.Command */ diff --git a/lib/Cake/Console/Templates/skel/Config/app.php b/lib/Cake/Console/Templates/skel/Config/app.php index 0c90abc90d1..167065c754e 100644 --- a/lib/Cake/Console/Templates/skel/Config/app.php +++ b/lib/Cake/Console/Templates/skel/Config/app.php @@ -15,7 +15,6 @@ namespace App\Config; use Cake\Core\Configure; -use Cake\Core\ClassLoader; /** * CakePHP Debug Level: @@ -67,7 +66,7 @@ ]); /** - * Uncomment this line and correct your server timezone to fix + * Uncomment this line and correct your server timezone to fix * any date & time related errors. */ //date_default_timezone_set('UTC'); @@ -77,7 +76,7 @@ * The level of CakePHP security. * * - salt - A random string used in security hashing methods. - * - cipherSeed - A random numeric string (digits only) used to seed + * - cipherSeed - A random numeric string (digits only) used to seed * the xor cipher functions in Security. */ Configure::write('Security', [ diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index fb0fdbbca6c..d40b5c9f38d 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -24,8 +24,8 @@ use Cake\Event\EventManager; use Cake\Network\Request; use Cake\Network\Response; -use Cake\Routing\Router; use Cake\Routing\RequestActionTrait; +use Cake\Routing\Router; use Cake\Utility\ClassRegistry; use Cake\Utility\Inflector; use Cake\Utility\MergeVariablesTrait; diff --git a/lib/Cake/Core/Object.php b/lib/Cake/Core/Object.php index dd896416463..97aff2b0f5b 100644 --- a/lib/Cake/Core/Object.php +++ b/lib/Cake/Core/Object.php @@ -28,6 +28,7 @@ class Object { use LogTrait; + /** * constructor, no-op * diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 73079ef7ceb..d5a6c409066 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -60,6 +60,7 @@ * @package Cake.Error */ class ExceptionRenderer { + /** * Controller instance. * diff --git a/lib/Cake/Log/LogInterface.php b/lib/Cake/Log/LogInterface.php index 1b2d8602dfa..6bec4d6dbe0 100644 --- a/lib/Cake/Log/LogInterface.php +++ b/lib/Cake/Log/LogInterface.php @@ -20,6 +20,7 @@ * @package Cake.Log */ interface LogInterface { + /** * Write method to handle writes being made to the Logger * diff --git a/lib/Cake/Routing/DispatcherFilter.php b/lib/Cake/Routing/DispatcherFilter.php index b72844de74d..4a2443c5bd7 100644 --- a/lib/Cake/Routing/DispatcherFilter.php +++ b/lib/Cake/Routing/DispatcherFilter.php @@ -18,8 +18,8 @@ namespace Cake\Routing; -use Cake\Event\EventListener; use Cake\Event\Event; +use Cake\Event\EventListener; /** * This abstract class represents a filter to be applied to a dispatcher cycle. It acts as as diff --git a/lib/Cake/Routing/Route/Route.php b/lib/Cake/Routing/Route/Route.php index c3e759ae5c5..65e8b7dba03 100644 --- a/lib/Cake/Routing/Route/Route.php +++ b/lib/Cake/Routing/Route/Route.php @@ -141,7 +141,7 @@ public function compiled() { } /** - * Compiles the route's regular expression. Modifies defaults property so all necessary + * Compiles the route's regular expression. Modifies defaults property so all necessary * keys are set and populates $this->names with the named routing elements. * * @return array Returns a string regular expression of the compiled route. @@ -521,7 +521,7 @@ protected function _writeUrl($params, $pass = array(), $query = array()) { $out = $params['_base'] . $out; unset($params['_base']); } - + $out = str_replace('//', '/', $out); if ( diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index d7174046007..aa991152063 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -204,7 +204,7 @@ public static function getNamedExpressions() { /** * Resource map getter & setter. * - * Allows you to define the default route configuration for REST routing and + * Allows you to define the default route configuration for REST routing and * Router::mapResources() * * @param array $resourceMap Resource map @@ -251,7 +251,7 @@ public static function resourceMap($resourceMap = null) { * providing patterns for those parameters. Patterns for routing parameters * do not need capturing groups, as one will be added for each route params. * - * $options offers several 'special' keys that have special meaning + * $options offers several 'special' keys that have special meaning * in the $options array. * * - `pass` is used to define which of the routed parameters should be shifted @@ -366,7 +366,7 @@ public static function redirect($route, $url, $options = array()) { * Plugins will create lower_case underscored resource routes. e.g * `/comments/comment` * - * Connect resource routes for the Posts controller in the + * Connect resource routes for the Posts controller in the * Admin prefix: * * {{{ @@ -579,7 +579,7 @@ public static function promote($which = null) { * Add a url filter to Router. * * Url filter functions are applied to every array $url provided to - * Router::url() before the urls are sent to the route collection. + * Router::url() before the urls are sent to the route collection. * * Callback functions should expect the following parameters: * @@ -803,7 +803,7 @@ public static function url($url = null, $options = array()) { * * @param Cake\Network\Request|array $params The params array or * Cake\Network\Request object that needs to be reversed. - * @param boolean $full Set to true to include the full url including the + * @param boolean $full Set to true to include the full url including the * protocol when reversing the url. * @return string The string that is the reversed result of the array */ @@ -874,7 +874,7 @@ public static function normalize($url = '/') { * A list of valid extension can be passed to this method, i.e. Router::parseExtensions('rss', 'xml'); * If no parameters are given, anything after the first . (dot) after the last / in the URL will be * parsed, excluding querystring parameters (i.e. ?q=...). -* + * * @return void * @see RequestHandler::startup() */ diff --git a/lib/Cake/Test/TestApp/Controller/Admin/PostsController.php b/lib/Cake/Test/TestApp/Controller/Admin/PostsController.php index eac7af9f3aa..e254e23048b 100644 --- a/lib/Cake/Test/TestApp/Controller/Admin/PostsController.php +++ b/lib/Cake/Test/TestApp/Controller/Admin/PostsController.php @@ -21,6 +21,7 @@ * For testing prefix routing. */ class PostsController extends Controller { + /** * components * diff --git a/lib/Cake/Test/TestApp/Controller/AuthTestController.php b/lib/Cake/Test/TestApp/Controller/AuthTestController.php index 93d7371b00e..80e7ea183ef 100644 --- a/lib/Cake/Test/TestApp/Controller/AuthTestController.php +++ b/lib/Cake/Test/TestApp/Controller/AuthTestController.php @@ -59,7 +59,7 @@ class AuthTestController extends Controller { * * @return void */ - function __construct($request, $response) { + public function __construct($request = null, $response = null) { $request->addParams(Router::parse('/auth_test')); $request->here = '/auth_test'; $request->webroot = '/'; @@ -97,7 +97,6 @@ public function admin_add() { * @return void */ public function logout() { - } /** @@ -137,7 +136,6 @@ public function redirect($url, $status = null, $exit = true) { * @return void */ public function isAuthorized() { - } } diff --git a/lib/Cake/Test/TestApp/Controller/Component/TestAuthComponent.php b/lib/Cake/Test/TestApp/Controller/Component/TestAuthComponent.php index 36e365c6a2b..1341d54d3c4 100644 --- a/lib/Cake/Test/TestApp/Controller/Component/TestAuthComponent.php +++ b/lib/Cake/Test/TestApp/Controller/Component/TestAuthComponent.php @@ -37,7 +37,7 @@ class TestAuthComponent extends AuthComponent { * * @return void */ - function _stop($status = 0) { + protected function _stop($status = 0) { $this->testStop = true; } diff --git a/lib/Cake/Test/TestApp/Controller/RequestActionController.php b/lib/Cake/Test/TestApp/Controller/RequestActionController.php index 7d629332a27..653ee3ea260 100644 --- a/lib/Cake/Test/TestApp/Controller/RequestActionController.php +++ b/lib/Cake/Test/TestApp/Controller/RequestActionController.php @@ -25,31 +25,31 @@ class RequestActionController extends AppController { /** -* uses property -* -* @var array -* @access public -*/ + * uses property + * + * @var array + * @access public + */ public $uses = ['Post']; /** -* test_request_action method -* -* @access public -* @return void -*/ + * test_request_action method + * + * @access public + * @return void + */ public function test_request_action() { return 'This is a test'; } /** -* another_ra_test method -* -* @param mixed $id -* @param mixed $other -* @access public -* @return void -*/ + * another_ra_test method + * + * @param mixed $id + * @param mixed $other + * @access public + * @return void + */ public function another_ra_test($id, $other) { return $id + $other; } diff --git a/lib/Cake/Test/TestApp/Controller/SomePagesController.php b/lib/Cake/Test/TestApp/Controller/SomePagesController.php index f9cc1cefa52..88247dba31a 100644 --- a/lib/Cake/Test/TestApp/Controller/SomePagesController.php +++ b/lib/Cake/Test/TestApp/Controller/SomePagesController.php @@ -66,7 +66,6 @@ public function responseGenerator() { } protected function _fail() { - } } diff --git a/lib/Cake/Test/TestApp/Model/PaginatorControllerPost.php b/lib/Cake/Test/TestApp/Model/PaginatorControllerPost.php index 9b18e49a0de..8ce028f9102 100644 --- a/lib/Cake/Test/TestApp/Model/PaginatorControllerPost.php +++ b/lib/Cake/Test/TestApp/Model/PaginatorControllerPost.php @@ -80,7 +80,7 @@ public function beforeFind($query) { */ public function find($conditions = null, $fields = array(), $order = null, $recursive = null) { if ($conditions == 'popular') { - $conditions = array($this->name . '.' . $this->primaryKey .' > ' => '1'); + $conditions = array($this->name . '.' . $this->primaryKey . ' > ' => '1'); $options = Hash::merge($fields, compact('conditions')); return parent::find('all', $options); } diff --git a/lib/Cake/Test/TestApp/Model/PersisterTwo.php b/lib/Cake/Test/TestApp/Model/PersisterTwo.php index b976e09e506..012030eed29 100644 --- a/lib/Cake/Test/TestApp/Model/PersisterTwo.php +++ b/lib/Cake/Test/TestApp/Model/PersisterTwo.php @@ -21,7 +21,9 @@ namespace TestApp\Model; class PersisterTwo extends AppModel { + public $useTable = 'posts'; + public $name = 'PersisterTwo'; public $actsAs = array('PersisterOneBehavior', 'TestPlugin.TestPluginPersisterOne'); diff --git a/lib/Cake/Test/TestApp/Plugin/TestPlugin/Controller/Admin/CommentsController.php b/lib/Cake/Test/TestApp/Plugin/TestPlugin/Controller/Admin/CommentsController.php index 1836afe5497..a130d577b94 100644 --- a/lib/Cake/Test/TestApp/Plugin/TestPlugin/Controller/Admin/CommentsController.php +++ b/lib/Cake/Test/TestApp/Plugin/TestPlugin/Controller/Admin/CommentsController.php @@ -11,7 +11,7 @@ * @since CakePHP(tm) v 3.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace TestApp\Controller\Admin; +namespace TestPlugin\Controller\Admin; use Cake\Controller\Controller; @@ -21,6 +21,7 @@ * For testing prefix routing. */ class CommentsController extends Controller { + /** * components * diff --git a/lib/Cake/Test/TestCase/Cache/CacheTest.php b/lib/Cake/Test/TestCase/Cache/CacheTest.php index 745903755fa..80e5585c520 100644 --- a/lib/Cake/Test/TestCase/Cache/CacheTest.php +++ b/lib/Cake/Test/TestCase/Cache/CacheTest.php @@ -208,7 +208,7 @@ public function testConfigSettingDefaultConfigKey() { public function testConfigured() { Cache::drop('default'); $result = Cache::configured(); - $this->assertContains('_cake_core_', $result); + $this->assertContains('_cake_core_', $result); $this->assertNotContains('default', $result, 'Unconnected engines should not display.'); Cache::engine('default'); diff --git a/lib/Cake/Test/TestCase/Cache/Engine/RedisEngineTest.php b/lib/Cake/Test/TestCase/Cache/Engine/RedisEngineTest.php index 1b0d7253a5f..bea80aa87a2 100644 --- a/lib/Cake/Test/TestCase/Cache/Engine/RedisEngineTest.php +++ b/lib/Cake/Test/TestCase/Cache/Engine/RedisEngineTest.php @@ -13,10 +13,10 @@ */ namespace Cake\Test\TestCase\Cache\Engine; -use Cake\TestSuite\TestCase; -use Cake\Cache\Engine\RedisEngine; use Cake\Cache\Cache; +use Cake\Cache\Engine\RedisEngine; use Cake\Core\Configure; +use Cake\TestSuite\TestCase; /** * RedisEngineTest class diff --git a/lib/Cake/Test/TestCase/Configure/IniReaderTest.php b/lib/Cake/Test/TestCase/Configure/IniReaderTest.php index 80b2f51dbd5..ccdc2752d66 100644 --- a/lib/Cake/Test/TestCase/Configure/IniReaderTest.php +++ b/lib/Cake/Test/TestCase/Configure/IniReaderTest.php @@ -51,7 +51,7 @@ class IniReaderTest extends TestCase { */ public function setUp() { parent::setUp(); - $this->path = CAKE . 'Test/TestApp/Config'. DS; + $this->path = CAKE . 'Test/TestApp/Config' . DS; } /** diff --git a/lib/Cake/Test/TestCase/Configure/PhpReaderTest.php b/lib/Cake/Test/TestCase/Configure/PhpReaderTest.php index 2ca772b8501..d6655d08066 100644 --- a/lib/Cake/Test/TestCase/Configure/PhpReaderTest.php +++ b/lib/Cake/Test/TestCase/Configure/PhpReaderTest.php @@ -51,7 +51,7 @@ class PhpReaderTest extends TestCase { */ public function setUp() { parent::setUp(); - $this->path = CAKE . 'Test/TestApp/Config'. DS; + $this->path = CAKE . 'Test/TestApp/Config' . DS; } /** @@ -144,10 +144,10 @@ public function testDump() { $expected = << + 'One' => array ( 'two' => 'value', - 'three' => + 'three' => array ( 'four' => 'value four', ), @@ -155,7 +155,7 @@ public function testDump() { 'bool_false' => false, 'bool_true' => true, ), - 'Asset' => + 'Asset' => array ( 'timestamp' => 'force', ), diff --git a/lib/Cake/Test/TestCase/Console/Command/Task/ModelTaskTest.php b/lib/Cake/Test/TestCase/Console/Command/Task/ModelTaskTest.php index 67aaa584727..277f3044574 100644 --- a/lib/Cake/Test/TestCase/Console/Command/Task/ModelTaskTest.php +++ b/lib/Cake/Test/TestCase/Console/Command/Task/ModelTaskTest.php @@ -818,7 +818,7 @@ public function testBakeWithPlugin() { $this->Task->plugin = 'ControllerTest'; //fake plugin path - Plugin::load('ControllerTest', array('path' => APP . 'Plugin/ControllerTest/')); + Plugin::load('ControllerTest', array('path' => APP . 'Plugin/ControllerTest/')); $path = APP . 'Plugin/ControllerTest/Model/BakeArticle.php'; $this->Task->expects($this->once())->method('createFile') ->with($path, $this->stringContains('BakeArticle extends ControllerTestAppModel')); @@ -957,7 +957,7 @@ public function testExecuteIntoAll() { * * @return void */ - public function testExecuteIntoAllOddTables() { + public function testExecuteIntoAllOddTables() { $out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false); $in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false); $this->Task = $this->getMock('Cake\Console\Command\Task\ModelTask', @@ -1012,7 +1012,7 @@ public function testExecuteIntoAllOddTables() { * * @return void */ - public function testExecuteIntoBakeOddTables() { + public function testExecuteIntoBakeOddTables() { $out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false); $in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false); $this->Task = $this->getMock('Cake\Console\Command\Task\ModelTask', diff --git a/lib/Cake/Test/TestCase/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/TestCase/Console/Command/Task/TestTaskTest.php index c12ec355535..4022bbf4169 100644 --- a/lib/Cake/Test/TestCase/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/TestCase/Console/Command/Task/TestTaskTest.php @@ -604,7 +604,7 @@ public function testBakeWithPlugin() { //fake plugin path Plugin::load('TestTest', array('path' => APP . 'Plugin/TestTest/')); - $path = APP . 'Plugin/TestTest/Test/TestCase/View/Helper/FormHelperTest.php'; + $path = APP . 'Plugin/TestTest/Test/TestCase/View/Helper/FormHelperTest.php'; $this->Task->expects($this->once())->method('createFile') ->with($path, $this->anything()); diff --git a/lib/Cake/Test/TestCase/Console/Command/Task/ViewTaskTest.php b/lib/Cake/Test/TestCase/Console/Command/Task/ViewTaskTest.php index 9108cbf4631..23b60b0a4fa 100644 --- a/lib/Cake/Test/TestCase/Console/Command/Task/ViewTaskTest.php +++ b/lib/Cake/Test/TestCase/Console/Command/Task/ViewTaskTest.php @@ -399,7 +399,7 @@ public function testBakeWithPlugin() { //fake plugin path Plugin::load('TestTest', array('path' => APP . 'Plugin/TestTest/')); - $path = APP . 'Plugin/TestTest/View/ViewTaskComments/view.ctp'; + $path = APP . 'Plugin/TestTest/View/ViewTaskComments/view.ctp'; $result = $this->Task->getContent('index'); $this->assertNotContains('List Test Test.view Task Articles', $result); @@ -732,7 +732,7 @@ public function testGetTemplate() { $this->assertEquals('form', $result); $this->Task->Template->templatePaths = array( - 'test' => CAKE . 'Test/' . 'TestApp/Console/Templates/test/' + 'test' => CAKE . 'Test/' . 'TestApp/Console/Templates/test/' ); $this->Task->Template->params['theme'] = 'test'; diff --git a/lib/Cake/Test/TestCase/Controller/Component/Acl/IniAclTest.php b/lib/Cake/Test/TestCase/Controller/Component/Acl/IniAclTest.php index 2afe96139bd..23d3502f6f6 100644 --- a/lib/Cake/Test/TestCase/Controller/Component/Acl/IniAclTest.php +++ b/lib/Cake/Test/TestCase/Controller/Component/Acl/IniAclTest.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestCase\Controller\Component; +namespace Cake\Test\TestCase\Controller\Component\Acl; use Cake\Controller\Component\AclComponent; use Cake\Controller\Component\Acl\IniAcl; use Cake\TestSuite\TestCase; diff --git a/lib/Cake/Test/TestCase/Controller/Component/Acl/PhpAclTest.php b/lib/Cake/Test/TestCase/Controller/Component/Acl/PhpAclTest.php index a6c248eceba..9f5938cc890 100644 --- a/lib/Cake/Test/TestCase/Controller/Component/Acl/PhpAclTest.php +++ b/lib/Cake/Test/TestCase/Controller/Component/Acl/PhpAclTest.php @@ -11,7 +11,7 @@ * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestCase\Controller\Component; +namespace Cake\Test\TestCase\Controller\Component\Acl; use Cake\Controller\ComponentCollection; use Cake\Controller\Component\AclComponent; diff --git a/lib/Cake/Test/TestCase/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/TestCase/Controller/Component/AuthComponentTest.php index 887345914ea..4695bb9a8f2 100644 --- a/lib/Cake/Test/TestCase/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/TestCase/Controller/Component/AuthComponentTest.php @@ -36,10 +36,10 @@ use TestApp\Model\AuthUser; /** -* AuthComponentTest class -* -* @package Cake.Test.Case.Controller.Component -*/ + * AuthComponentTest class + * + * @package Cake.Test.Case.Controller.Component + */ class AuthComponentTest extends TestCase { /** diff --git a/lib/Cake/Test/TestCase/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/TestCase/Controller/Component/PaginatorComponentTest.php index 85f39a3d4a8..e72f4de3fd3 100644 --- a/lib/Cake/Test/TestCase/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/TestCase/Controller/Component/PaginatorComponentTest.php @@ -13,11 +13,11 @@ */ namespace Cake\Test\TestCase\Controller\Component; -use Cake\TestSuite\TestCase; use Cake\Controller\Component\PaginatorComponent; use Cake\Controller\Controller; use Cake\Core\Configure; use Cake\Network\Request; +use Cake\TestSuite\TestCase; use Cake\Utility\Hash; /** diff --git a/lib/Cake/Test/TestCase/Controller/PagesControllerTest.php b/lib/Cake/Test/TestCase/Controller/PagesControllerTest.php index 7c4ddde41ed..0e86d1d9b67 100644 --- a/lib/Cake/Test/TestCase/Controller/PagesControllerTest.php +++ b/lib/Cake/Test/TestCase/Controller/PagesControllerTest.php @@ -17,11 +17,11 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ namespace Cake\Test\TestCase\Controller; +use \App\Controller\PagesController; use Cake\Core\App; use Cake\Network\Request; use Cake\Network\Response; use Cake\TestSuite\TestCase; -use \App\Controller\PagesController; /** * PagesControllerTest class diff --git a/lib/Cake/Test/TestCase/Core/AppTest.php b/lib/Cake/Test/TestCase/Core/AppTest.php index 6b2ec085394..e3f11eaeb57 100644 --- a/lib/Cake/Test/TestCase/Core/AppTest.php +++ b/lib/Cake/Test/TestCase/Core/AppTest.php @@ -266,14 +266,14 @@ public function testBuildPackage() { * @return void */ public function testPathWithPlugins() { - $basepath = CAKE . 'Test' . DS . 'TestApp' . DS. 'Plugin' . DS; + $basepath = CAKE . 'Test' . DS . 'TestApp' . DS . 'Plugin' . DS; App::build(array( 'Plugin' => array($basepath), )); Plugin::load('TestPlugin'); $result = App::path('Vendor', 'TestPlugin'); - $this->assertEquals($basepath . 'TestPlugin' . DS. 'vendor' . DS, $result[0]); + $this->assertEquals($basepath . 'TestPlugin' . DS . 'vendor' . DS, $result[0]); } /** @@ -333,7 +333,7 @@ public function testCore() { * @return void */ public function testListObjects() { - $result = App::objects('class', CAKE . 'Routing', false); + $result = App::objects('class', CAKE . 'Routing', false); $this->assertTrue(in_array('Dispatcher', $result)); $this->assertTrue(in_array('Router', $result)); diff --git a/lib/Cake/Test/TestCase/Core/PluginTest.php b/lib/Cake/Test/TestCase/Core/PluginTest.php index 741fd428e7f..661b436ceb7 100644 --- a/lib/Cake/Test/TestCase/Core/PluginTest.php +++ b/lib/Cake/Test/TestCase/Core/PluginTest.php @@ -177,7 +177,6 @@ public function testMultipleBootstrapFiles() { $this->assertEquals('loaded plugin bootstrap', Configure::read('PluginTest.test_plugin.bootstrap')); } - /** * Tests that it is possible to load plugin bootstrap by calling a callback function * @@ -210,7 +209,6 @@ public function testLoadNotFound() { Plugin::load('MissingPlugin'); } - /** * Tests that Plugin::path() returns the correct path for the loaded plugins * diff --git a/lib/Cake/Test/TestCase/Log/LogTest.php b/lib/Cake/Test/TestCase/Log/LogTest.php index ced22e51c3a..6c00c83b0be 100644 --- a/lib/Cake/Test/TestCase/Log/LogTest.php +++ b/lib/Cake/Test/TestCase/Log/LogTest.php @@ -12,7 +12,7 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestSuite\Log; +namespace Cake\Test\TestCase\Log; use Cake\Core\App; use Cake\Core\Configure; @@ -127,7 +127,7 @@ public function testDrop() { } /** - * Test that engine() throws an exception when adding an + * Test that engine() throws an exception when adding an * adapter with the wrong type. * * @expectedException Cake\Error\Exception @@ -504,5 +504,4 @@ public function testWriteUnhandled() { $this->assertFalse($result); } - } diff --git a/lib/Cake/Test/TestCase/Log/LogTraitTest.php b/lib/Cake/Test/TestCase/Log/LogTraitTest.php index 2a7e4b30f97..c4d15ec08d1 100644 --- a/lib/Cake/Test/TestCase/Log/LogTraitTest.php +++ b/lib/Cake/Test/TestCase/Log/LogTraitTest.php @@ -14,8 +14,8 @@ namespace Cake\Test\TestCase\Log; use Cake\Log\Log; -use Cake\Log\LogTrait; use Cake\Log\LogInterface; +use Cake\Log\LogTrait; use Cake\TestSuite\TestCase; /** @@ -40,7 +40,7 @@ public function testLog() { $mock->expects($this->at(0)) ->method('write') ->with('error', 'Testing'); - + $mock->expects($this->at(1)) ->method('write') ->with('debug', print_r(array(1, 2), true)); diff --git a/lib/Cake/Test/TestCase/Model/AclNodeTest.php b/lib/Cake/Test/TestCase/Model/AclNodeTest.php index 8b25ed84147..6e884588f8b 100644 --- a/lib/Cake/Test/TestCase/Model/AclNodeTest.php +++ b/lib/Cake/Test/TestCase/Model/AclNodeTest.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\TestCase\Model; +namespace Cake\Test\TestCase\Model; use Cake\Controller\Component\Acl\DbAcl; use Cake\Model\AclNode; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Database/MysqlTest.php index 5d32eef6972..ebcfd29662e 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Database/MysqlTest.php @@ -16,12 +16,12 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestCase\Datasource\Database; +namespace Cake\Test\TestCase\Model\Datasource\Database; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Model\Model; use Cake\Model\Datasource\Database\Mysql; +use Cake\Model\Model; use Cake\Model\Schema; use Cake\TestSuite\TestCase; use Cake\Utility\ClassRegistry; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Database/PostgresTest.php index 40f7ac45b51..cafb2615f7f 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Database/PostgresTest.php @@ -16,12 +16,12 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestCase\Datasource\Database; +namespace Cake\Test\TestCase\Model\Datasource\Database; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Model\Model; use Cake\Model\Datasource\Database\Postgres; +use Cake\Model\Model; use Cake\TestSuite\TestCase; require_once dirname(dirname(__DIR__)) . DS . 'models.php'; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Database/SqliteTest.php index 29fd69ec9aa..c414ee92788 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Database/SqliteTest.php @@ -16,12 +16,12 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestCase\Datasource\Database; +namespace Cake\Test\TestCase\Model\Datasource\Database; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Model\Model; use Cake\Model\Datasource\Database\Sqlite; +use Cake\Model\Model; use Cake\TestSuite\TestCase; require_once dirname(dirname(__DIR__)) . DS . 'models.php'; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Database/SqlserverTest.php index a3cb307d2ab..a8206a48e12 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Database/SqlserverTest.php @@ -17,14 +17,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestCase\Datasource\Database; +namespace Cake\Test\TestCase\Model\Datasource\Database; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Model\Model; use Cake\Model\Datasource\Database\Sqlserver; -use Cake\TestSuite\TestCase; +use Cake\Model\Model; use Cake\TestSuite\Fixture\TestModel; +use Cake\TestSuite\TestCase; require_once dirname(dirname(__DIR__)) . DS . 'models.php'; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/TestCase/Model/Datasource/DboSourceTest.php index f799e1cfbed..fad22059beb 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/DboSourceTest.php @@ -15,13 +15,13 @@ namespace Cake\Test\TestCase\Model\Datasource; use Cake\Core\Configure; -use Cake\Model\Model; use Cake\Model\ConnectionManager; use Cake\Model\Datasource\Datasource; use Cake\Model\Datasource\DboSource; +use Cake\Model\Model; use Cake\TestSuite\TestCase; -use Cake\Utility\Hash; use Cake\Utility\ClassRegistry; +use Cake\Utility\Hash; require_once dirname(__DIR__) . DS . 'models.php'; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Session/CacheSessionTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Session/CacheSessionTest.php index d060341fabc..8d1c8390189 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Session/CacheSessionTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Session/CacheSessionTest.php @@ -18,8 +18,8 @@ */ namespace Cake\Test\TestCase\Model\Datasource\Session; -use Cake\Core\Configure; use Cake\Cache\Cache; +use Cake\Core\Configure; use Cake\Model\Datasource\Session; use Cake\Model\Datasource\Session\CacheSession; use Cake\TestSuite\TestCase; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/Session/DatabaseSessionTest.php b/lib/Cake/Test/TestCase/Model/Datasource/Session/DatabaseSessionTest.php index e6fb6a52064..e2264a5d4fa 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/Session/DatabaseSessionTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/Session/DatabaseSessionTest.php @@ -19,9 +19,9 @@ namespace Cake\Test\TestCase\Model\Datasource\Session; use Cake\Core\Configure; -use Cake\Model\Model; use Cake\Model\Datasource\Session; use Cake\Model\Datasource\Session\DatabaseSession; +use Cake\Model\Model; use Cake\TestSuite\TestCase; use Cake\Utility\ClassRegistry; diff --git a/lib/Cake/Test/TestCase/Model/Datasource/SessionTest.php b/lib/Cake/Test/TestCase/Model/Datasource/SessionTest.php index 70c9ccd4eb5..f16ec4e0093 100644 --- a/lib/Cake/Test/TestCase/Model/Datasource/SessionTest.php +++ b/lib/Cake/Test/TestCase/Model/Datasource/SessionTest.php @@ -18,8 +18,8 @@ use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Model\Datasource\Session; -use Cake\Model\Datasource\Session\DatabaseSession; use Cake\Model\Datasource\Session\CacheSession; +use Cake\Model\Datasource\Session\DatabaseSession; use Cake\TestSuite\TestCase; class TestCakeSession extends Session { diff --git a/lib/Cake/Test/TestCase/Model/SchemaTest.php b/lib/Cake/Test/TestCase/Model/SchemaTest.php index 89e419b0275..fde9af73891 100644 --- a/lib/Cake/Test/TestCase/Model/SchemaTest.php +++ b/lib/Cake/Test/TestCase/Model/SchemaTest.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\TestCase\Model; +namespace Cake\Test\TestCase\Model; use Cake\Core\Plugin; use Cake\Model\Schema; diff --git a/lib/Cake/Test/TestCase/Model/Validator/ValidationSetTest.php b/lib/Cake/Test/TestCase/Model/Validator/ValidationSetTest.php index 24003c01643..b470f460bb7 100644 --- a/lib/Cake/Test/TestCase/Model/Validator/ValidationSetTest.php +++ b/lib/Cake/Test/TestCase/Model/Validator/ValidationSetTest.php @@ -18,8 +18,8 @@ */ namespace Cake\Test\TestCase\Model\Validator; -use Cake\Model\Validator\ValidationSet; use Cake\Model\Validator\ValidationRule; +use Cake\Model\Validator\ValidationSet; use Cake\TestSuite\TestCase; /** diff --git a/lib/Cake/Test/TestCase/Network/RequestTest.php b/lib/Cake/Test/TestCase/Network/RequestTest.php index c1cb0d6c65a..a1b03ba8edc 100644 --- a/lib/Cake/Test/TestCase/Network/RequestTest.php +++ b/lib/Cake/Test/TestCase/Network/RequestTest.php @@ -12,7 +12,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -namespace Cake\Test\TestSuite\Network; +namespace Cake\Test\TestCase\Network; use Cake\Core\Configure; use Cake\Error; @@ -536,7 +536,7 @@ public function testclientIp() { $request->trustProxy = true; $this->assertEquals('192.168.1.5', $request->clientIp()); - + $request->trustProxy = false; $this->assertEquals('192.168.1.2', $request->clientIp()); @@ -1930,12 +1930,12 @@ public function testReadCookie() { )); $result = $request->cookie('testing'); $this->assertEquals('A value in the cookie', $result); - + $result = $request->cookie('not there'); $this->assertNull($result); } - /* +/** * TestOnlyAllow * * @return void diff --git a/lib/Cake/Test/TestCase/Routing/Filter/AssetDispatcherTest.php b/lib/Cake/Test/TestCase/Routing/Filter/AssetDispatcherTest.php index 463ac8b854f..bba6bf03bb7 100644 --- a/lib/Cake/Test/TestCase/Routing/Filter/AssetDispatcherTest.php +++ b/lib/Cake/Test/TestCase/Routing/Filter/AssetDispatcherTest.php @@ -14,13 +14,14 @@ */ namespace Cake\Test\TestCase\Routing\Filter; -use Cake\TestSuite\TestCase; -use Cake\Routing\Filter\AssetDispatcher; + use Cake\Core\App; use Cake\Core\Configure; use Cake\Event\Event; use Cake\Network\Request; use Cake\Network\Response; +use Cake\Routing\Filter\AssetDispatcher; +use Cake\TestSuite\TestCase; class AssetDispatcherTest extends TestCase { diff --git a/lib/Cake/Test/TestCase/Routing/Route/RouteTest.php b/lib/Cake/Test/TestCase/Routing/Route/RouteTest.php index 1e9e93387bc..3eaf12539fe 100644 --- a/lib/Cake/Test/TestCase/Routing/Route/RouteTest.php +++ b/lib/Cake/Test/TestCase/Routing/Route/RouteTest.php @@ -328,7 +328,7 @@ public function testMatchBasic() { 'controller' => 'subscribe', 'prefix' => 'admin' )); - $url = array('controller' => 'subscribe', 'prefix' => 'admin', 'action' => 'edit', 1); + $url = array('controller' => 'subscribe', 'prefix' => 'admin', 'action' => 'edit', 1); $result = $route->match($url); $expected = '/admin/subscriptions/edit/1'; $this->assertEquals($expected, $result); @@ -545,7 +545,7 @@ public function testQueryStringGeneration() { $restore = ini_get('arg_separator.output'); ini_set('arg_separator.output', '&'); - + $result = $route->match(array( 'controller' => 'posts', 'action' => 'index', @@ -645,7 +645,6 @@ public function testParseWithHttpHeaderConditions() { '[method]' => 'POST', ]; $this->assertEquals($expected, $route->parse('/sample')); - } /** @@ -672,7 +671,6 @@ public function testParseWithMultipleHttpMethodConditions() { $this->assertEquals($expected, $route->parse('/sample')); } - /** * Test that the [type] condition works. * diff --git a/lib/Cake/Test/TestCase/Routing/RouterTest.php b/lib/Cake/Test/TestCase/Routing/RouterTest.php index 56296f3afaa..114d4695eba 100644 --- a/lib/Cake/Test/TestCase/Routing/RouterTest.php +++ b/lib/Cake/Test/TestCase/Routing/RouterTest.php @@ -22,9 +22,9 @@ use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Network\Request; -use Cake\Routing\Route\Route; use Cake\Routing\RouteCollection; use Cake\Routing\Router; +use Cake\Routing\Route\Route; use Cake\TestSuite\TestCase; if (!defined('FULL_BASE_URL')) { @@ -1349,7 +1349,7 @@ public function testPrefixRoutingAndPlugins() { Configure::write('Routing.prefixes', array('admin')); $paths = App::path('Plugin'); App::build(array( - 'Plugin' => array( + 'Plugin' => array( CAKE . 'Test/TestApp/Plugin/' ) ), App::RESET); @@ -2107,7 +2107,7 @@ public function testDefaultsMethod() { */ public function testConnectDefaultRoutes() { App::build(array( - 'Plugin' => array( + 'Plugin' => array( CAKE . 'Test/TestApp/Plugin/' ) ), App::RESET); diff --git a/lib/Cake/Test/TestCase/TestSuite/TestCaseTest.php b/lib/Cake/Test/TestCase/TestSuite/TestCaseTest.php index 62491ed42e9..d8520b6d984 100644 --- a/lib/Cake/Test/TestCase/TestSuite/TestCaseTest.php +++ b/lib/Cake/Test/TestCase/TestSuite/TestCaseTest.php @@ -13,10 +13,10 @@ */ namespace Cake\Test\TestCase\TestSuite; +use Cake\Controller\Controller; use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\Plugin; -use Cake\Controller\Controller; use Cake\TestSuite\TestCase; use Cake\Test\Fixture\AssertTagsTestCase; use Cake\Test\Fixture\FixturizedTestCase; diff --git a/lib/Cake/Test/TestCase/Utility/StringTest.php b/lib/Cake/Test/TestCase/Utility/StringTest.php index e96c819cdf8..6e1684d6658 100644 --- a/lib/Cake/Test/TestCase/Utility/StringTest.php +++ b/lib/Cake/Test/TestCase/Utility/StringTest.php @@ -335,7 +335,7 @@ public function testWrap() { This is the song th at never ends. This is the song that n -ever ends. This is +ever ends. This is the song that never ends. TEXT; @@ -967,9 +967,9 @@ public function testUtf8() { 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 7804, 7806, 7808, 7810, 7812, 7814, 7816, 7818, 7820, 7822, - 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, + 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, - 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); + 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); $this->assertEquals($expected, $result); $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; @@ -1286,9 +1286,9 @@ public function testAscii() { 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 7804, 7806, 7808, 7810, 7812, 7814, 7816, 7818, 7820, 7822, - 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, + 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, - 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); + 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); $result = String::ascii($input); $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; $this->assertEquals($expected, $result); diff --git a/lib/Cake/Test/TestCase/Utility/ValidationTest.php b/lib/Cake/Test/TestCase/Utility/ValidationTest.php index 8a41d0523ee..a3e84b0c2f5 100644 --- a/lib/Cake/Test/TestCase/Utility/ValidationTest.php +++ b/lib/Cake/Test/TestCase/Utility/ValidationTest.php @@ -2147,7 +2147,7 @@ public function testPostal() { * @return void */ public function testPhonePostalSsnPass() { - $this->assertTrue(Validation::postal('text', null, __NAMESPACE__ . '\TestNlValidation')); + $this->assertTrue(Validation::postal('text', null, __NAMESPACE__ . '\TestNlValidation')); $this->assertTrue(Validation::phone('text', null, __NAMESPACE__ . '\TestDeValidation')); $this->assertTrue(Validation::ssn('text', null, __NAMESPACE__ . '\TestNlValidation')); } diff --git a/lib/Cake/Test/TestCase/View/MediaViewTest.php b/lib/Cake/Test/TestCase/View/MediaViewTest.php index 05319bda35f..1646de56d4c 100644 --- a/lib/Cake/Test/TestCase/View/MediaViewTest.php +++ b/lib/Cake/Test/TestCase/View/MediaViewTest.php @@ -130,7 +130,6 @@ public function testRenderCachingAndName() { * @return void */ public function testRenderUpperExtension() { - return; $this->MediaView->viewVars = array( 'path' => CAKE . 'Test/TestApp/vendor/img/', 'id' => 'test_2.JPG' diff --git a/lib/Cake/Test/TestCase/View/ThemeViewTest.php b/lib/Cake/Test/TestCase/View/ThemeViewTest.php index e5804f03ac9..49e8214ec03 100644 --- a/lib/Cake/Test/TestCase/View/ThemeViewTest.php +++ b/lib/Cake/Test/TestCase/View/ThemeViewTest.php @@ -151,7 +151,7 @@ public function testPluginThemedGetTemplate() { $ThemeView = new TestTheme2View($this->Controller); $themePath = CAKE . 'Test' . DS . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS; - $expected = $themePath . 'Plugin' . DS . 'TestPlugin' . DS . 'Tests' . DS . 'index.ctp'; + $expected = $themePath . 'Plugin' . DS . 'TestPlugin' . DS . 'Tests' . DS . 'index.ctp'; $result = $ThemeView->getViewFileName('index'); $this->assertEquals($expected, $result); diff --git a/lib/Cake/TestSuite/TestSuiteCommand.php b/lib/Cake/TestSuite/TestSuiteCommand.php index 9e18524d221..604a585d548 100644 --- a/lib/Cake/TestSuite/TestSuiteCommand.php +++ b/lib/Cake/TestSuite/TestSuiteCommand.php @@ -36,9 +36,9 @@ class TestSuiteCommand extends \PHPUnit_TextUI_Command { * @throws Cake\Error\MissingTestLoaderException When a loader class could not be found. */ public function __construct($loader, $params = array()) { - if ($loader && !class_exists($loader)) { - throw new Error\MissingTestLoaderException(array('class' => $loader)); - } + if ($loader && !class_exists($loader)) { + throw new Error\MissingTestLoaderException(array('class' => $loader)); + } $this->arguments['loader'] = $loader; $this->arguments['test'] = $params['case']; $this->arguments['testFile'] = $params; diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index a380c892908..58e0fdf12ba 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -355,13 +355,10 @@ function env($key) { $offset = 4; } return substr($filename, 0, -(strlen($name) + $offset)); - break; case 'PHP_SELF': return str_replace(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME')); - break; case 'CGI_MODE': return (PHP_SAPI === 'cgi'); - break; case 'HTTP_BASE': $host = env('HTTP_HOST'); $parts = explode('.', $host); @@ -401,7 +398,6 @@ function env($key) { } array_shift($parts); return '.' . implode('.', $parts); - break; } return null; }