diff --git a/lib/Cake/Console/Command/CommandListShell.php b/lib/Cake/Console/Command/CommandListShell.php index 67e0005cb..051436a7d 100644 --- a/lib/Cake/Console/Command/CommandListShell.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -81,7 +81,8 @@ class CommandListShell extends Shell { protected function _getShellList() { $shellList = array(); - $shells = App::objects('file', App::core('Console/Command')); + $corePath = App::core('Console/Command'); + $shells = App::objects('file', $corePath[0]); $shellList = $this->_appendShells('CORE', $shells, $shellList); $appShells = App::objects('Console/Command', null, false); diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index f3bd3841b..b38429719 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -546,9 +546,10 @@ class CakeSchema extends Object { $difference[$key] = $value; continue; } - $compare = strval($value); - $correspondingValue = strval($correspondingValue); - if ($compare === $correspondingValue) { + if (is_array($value) && is_array($correspondingValue)) { + continue; + } + if ($value === $correspondingValue) { continue; } $difference[$key] = $value; diff --git a/lib/Cake/Test/Case/Controller/ComponentTest.php b/lib/Cake/Test/Case/Controller/ComponentTest.php index a613c944d..888a1f014 100644 --- a/lib/Cake/Test/Case/Controller/ComponentTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentTest.php @@ -40,23 +40,6 @@ class ParamTestComponent extends Component { * @var array */ public $components = array('Banana' => array('config' => 'value')); - -/** - * initialize method - * - * @param mixed $controller - * @param mixed $settings - * @return void - */ - public function initialize(&$controller, $settings) { - foreach ($settings as $key => $value) { - if (is_numeric($key)) { - $this->{$value} = true; - } else { - $this->{$key} = $value; - } - } - } } /** @@ -109,7 +92,7 @@ class AppleComponent extends Component { * @param mixed $controller * @return void */ - public function startup(&$controller) { + public function startup($controller) { $this->testName = $controller->name; } } @@ -134,7 +117,7 @@ class OrangeComponent extends Component { * @param mixed $controller * @return void */ - public function initialize(&$controller) { + public function initialize($controller) { $this->Controller = $controller; $this->Banana->testField = 'OrangeField'; } @@ -145,7 +128,7 @@ class OrangeComponent extends Component { * @param Controller $controller * @return string */ - public function startup(&$controller) { + public function startup($controller) { $controller->foo = 'pass'; } } @@ -170,7 +153,7 @@ class BananaComponent extends Component { * @param Controller $controller * @return string */ - public function startup(&$controller) { + public function startup($controller) { $controller->bar = 'fail'; } } diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index c93079b62..d492b1d8a 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -102,7 +102,7 @@ class ControllerPost extends CakeTestModel { * @param array $options * @return void */ - public function find($type, $options = array()) { + public function find($type = 'first', $options = array()) { if ($type == 'popular') { $conditions = array($this->name . '.' . $this->primaryKey .' > ' => '1'); $options = Set::merge($options, compact('conditions')); diff --git a/lib/Cake/Test/Case/Controller/PagesControllerTest.php b/lib/Cake/Test/Case/Controller/PagesControllerTest.php index 8a71cb5ae..cd451f2d8 100644 --- a/lib/Cake/Test/Case/Controller/PagesControllerTest.php +++ b/lib/Cake/Test/Case/Controller/PagesControllerTest.php @@ -26,15 +26,6 @@ App::uses('PagesController', 'Controller'); */ class PagesControllerTest extends CakeTestCase { -/** - * endTest method - * - * @return void - */ - public function endTest() { - App::build(); - } - /** * testDisplay method * diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index fcd7648be..f28f03828 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -87,12 +87,12 @@ class ScaffoldMockControllerWithFields extends Controller { class TestScaffoldMock extends Scaffold { /** - * Overload __scaffold + * Overload _scaffold * * @param unknown_type $params */ - function _scaffold($params) { - $this->_params = $params; + function _scaffold(CakeRequest $request) { + $this->_params = $request; } /** diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index 48064925a..f353b87bf 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -64,7 +64,7 @@ class BlueberryComponent extends Component { * * @return void */ - public function initialize(&$controller) { + public function initialize($controller) { $this->testName = 'BlueberryComponent'; } } diff --git a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php index 909c5dbf9..332a01d43 100644 --- a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php @@ -3305,9 +3305,9 @@ class ContainableBehaviorTest extends CakeTestCase { $this->assertTrue(empty($this->Article->hasMany['ArticlesTag'])); - $this->JoinA =& ClassRegistry::init('JoinA'); - $this->JoinB =& ClassRegistry::init('JoinB'); - $this->JoinC =& ClassRegistry::init('JoinC'); + $this->JoinA = ClassRegistry::init('JoinA'); + $this->JoinB = ClassRegistry::init('JoinB'); + $this->JoinC = ClassRegistry::init('JoinC'); $this->JoinA->Behaviors->attach('Containable'); $this->JoinB->Behaviors->attach('Containable'); diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index f83c5a61b..d4fd29a77 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -955,7 +955,7 @@ class CakeSchemaTest extends CakeTestCase { ) ) ); - $this->assertEqual($compare, $expected); + $this->assertEquals($expected, $compare); } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index 68003fd15..7aa531359 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -43,7 +43,7 @@ class DboPostgresTestDb extends Postgres { * @param mixed $sql * @return void */ - function _execute($sql, $params = array()) { + function _execute($sql, $params = array(), $prepareOptions = array()) { $this->simulated[] = $sql; return null; } diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index 9b08b4bdf..e5a5d1000 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -42,7 +42,7 @@ class DboSqliteTestDb extends Sqlite { * @param mixed $sql * @return void */ - function _execute($sql, $params = array()) { + function _execute($sql, $params = array(), $prepareOptions = array()) { $this->simulated[] = $sql; return null; } diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index 54fdad8dc..92a244a35 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -48,9 +48,11 @@ class SqlserverTestDb extends Sqlserver { * execute method * * @param mixed $sql + * @param mixed $params + * @param mixed $prepareOptions * @return mixed */ - protected function _execute($sql) { + protected function _execute($sql, $params = array(), $prepareOptions = array()) { $this->simulated[] = $sql; return empty($this->executeResultsStack) ? null : array_pop($this->executeResultsStack); } diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index f870aac1c..85aaf03e3 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -33,10 +33,10 @@ class DboTestSource extends DboSource { } public function mergeAssociation(&$data, &$merge, $association, $type, $selfJoin = false) { - return parent::_mergeAssociation(&$data, &$merge, $association, $type, $selfJoin); + return parent::_mergeAssociation($data, $merge, $association, $type, $selfJoin); } - public function setConfig($config) { + public function setConfig($config = array()) { $this->config = $config; } diff --git a/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php b/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php index ca8a9dc3b..62699b8d6 100644 --- a/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php +++ b/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php @@ -35,7 +35,7 @@ class DigestHttpSocket extends HttpSocket { * @param mixed $request * @return void */ - public function request($request) { + public function request($request = array()) { if ($request === false) { if (isset($this->response['header']['WWW-Authenticate'])) { unset($this->response['header']['WWW-Authenticate']); @@ -192,4 +192,4 @@ class DigestAuthenticationTest extends CakeTestCase { $this->assertFalse(isset($this->HttpSocket->request['header']['Authorization'])); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php index acf6475f5..e5697e004 100644 --- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php @@ -42,6 +42,7 @@ class SessionHelperTest extends CakeTestCase { if (!CakeSession::started()) { CakeSession::start(); + var_dump('session was not started'); } $_SESSION = array( @@ -70,6 +71,7 @@ class SessionHelperTest extends CakeTestCase { ), 'Deeply' => array('nested' => array('key' => 'value')), ); + var_dump($_SESSION); } /**