Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing tests in debugger after changing array output to use short syntax

  • Loading branch information...
commit c2572636ba37b33aae1161dd5135e37f9210115e 1 parent be02dd3
José Lorenzo Rodríguez lorenzo authored
Showing with 33 additions and 34 deletions.
  1. +33 −34 tests/TestCase/Utility/DebuggerTest.php
67 tests/TestCase/Utility/DebuggerTest.php
View
@@ -313,11 +313,11 @@ public function testExportVar() {
Blocks => object(Cake\View\ViewBlock) {}
plugin => null
name => ''
- passedArgs => array()
- helpers => array(
+ passedArgs => []
+ helpers => [
(int) 0 => 'Html',
(int) 1 => 'Form'
- )
+ ]
viewPath => ''
view => null
layout => 'default'
@@ -326,20 +326,20 @@ public function testExportVar() {
subDir => null
theme => null
cacheAction => false
- validationErrors => array()
+ validationErrors => []
hasRendered => false
- uuids => array()
+ uuids => []
request => object(Cake\Network\Request) {}
response => object(Cake\Network\Response) {}
elementCache => 'default'
- elementCacheSettings => array()
- viewVars => array()
+ elementCacheSettings => []
+ viewVars => []
Html => object(Cake\View\Helper\HtmlHelper) {}
Form => object(Cake\View\Helper\FormHelper) {}
int => (int) 2
float => (float) 1.333
[protected] _ext => '.ctp'
- [protected] _passedVars => array(
+ [protected] _passedVars => [
(int) 0 => 'viewVars',
(int) 1 => 'autoLayout',
(int) 2 => 'helpers',
@@ -353,13 +353,13 @@ public function testExportVar() {
(int) 10 => 'plugin',
(int) 11 => 'passedArgs',
(int) 12 => 'cacheAction'
- )
- [protected] _scripts => array()
- [protected] _paths => array()
- [protected] _parents => array()
+ ]
+ [protected] _scripts => []
+ [protected] _paths => []
+ [protected] _parents => []
[protected] _current => null
[protected] _currentType => ''
- [protected] _stack => array()
+ [protected] _stack => []
[protected] _eventManager => object(Cake\Event\EventManager) {}
}
TEXT;
@@ -372,10 +372,10 @@ public function testExportVar() {
);
$result = Debugger::exportVar($data);
$expected = <<<TEXT
-array(
+[
(int) 1 => 'Index one',
(int) 5 => 'Index five'
-)
+]
TEXT;
$this->assertTextEquals($expected, $result);
@@ -386,11 +386,11 @@ public function testExportVar() {
);
$result = Debugger::exportVar($data, 1);
$expected = <<<TEXT
-array(
- 'key' => array(
+[
+ 'key' => [
[maximum depth reached]
- )
-)
+ ]
+]
TEXT;
$this->assertTextEquals($expected, $result);
@@ -422,13 +422,13 @@ public function testExportVarZero() {
);
$result = Debugger::exportVar($data);
$expected = <<<TEXT
-array(
+[
'nothing' => '',
'null' => null,
'false' => false,
'szero' => '0',
'zero' => (int) 0
-)
+]
TEXT;
$this->assertTextEquals($expected, $result);
}
@@ -454,7 +454,6 @@ public function testLog() {
->with('debug', $this->logicalAnd(
$this->stringContains('DebuggerTest::testLog'),
$this->stringContains('[main]'),
- $this->stringContains('array'),
$this->stringContains("'whatever',"),
$this->stringContains("'here'")
));
@@ -513,20 +512,20 @@ public function testDump() {
$open = php_sapi_name() == 'cli' ? "\n" : '<pre>';
$close = php_sapi_name() == 'cli' ? "\n" : '</pre>';
$expected = <<<TEXT
-{$open}array(
- 'People' => array(
- (int) 0 => array(
+{$open}[
+ 'People' => [
+ (int) 0 => [
'name' => 'joeseph',
'coat' => 'technicolor',
'hair_color' => 'brown'
- ),
- (int) 1 => array(
+ ],
+ (int) 1 => [
'name' => 'Shaft',
'coat' => 'black',
'hair' => 'black'
- )
- )
-){$close}
+ ]
+ ]
+]{$close}
TEXT;
$this->assertTextEquals($expected, $result);
@@ -537,11 +536,11 @@ public function testDump() {
$open = php_sapi_name() == 'cli' ? "\n" : '<pre>';
$close = php_sapi_name() == 'cli' ? "\n" : '</pre>';
$expected = <<<TEXT
-{$open}array(
- 'People' => array(
+{$open}[
+ 'People' => [
[maximum depth reached]
- )
-){$close}
+ ]
+]{$close}
TEXT;
$this->assertTextEquals($expected, $result);
}
Please sign in to comment.
Something went wrong with that request. Please try again.