Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/php-short-array-syntax'
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Jun 5, 2015
2 parents 845d1c2 + 3d81544 commit 0c4c71c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .php_cs
Expand Up @@ -32,6 +32,7 @@ $config->fixers(
'object_operator',
'php_closing_tag',
'remove_lines_between_uses',
'short_array_syntax',
'short_tag',
'standardize_not_equal',
'trailing_spaces',
Expand Down
12 changes: 6 additions & 6 deletions test/DebugTest.php
Expand Up @@ -31,7 +31,7 @@ public function testDebugDump()
Debug::setSapi('cli');
$data = 'string';
$result = Debug::Dump($data, null, false);
$result = str_replace(array(PHP_EOL, "\n"), '_', $result);
$result = str_replace([PHP_EOL, "\n"], '_', $result);
$expected = "__string(6) \"string\"__";
$this->assertEquals($expected, $result);
}
Expand All @@ -44,10 +44,10 @@ public function testDebugCgi()

// Has to check for two strings, because xdebug internally handles CLI vs Web
$this->assertContains($result,
array(
[
"<pre>string(6) \"string\"\n</pre>",
"<pre>string(6) &quot;string&quot;\n</pre>",
)
]
);
}

Expand All @@ -71,7 +71,7 @@ public function testDebugDumpLabel()
$data = 'string';
$label = 'LABEL';
$result = Debug::Dump($data, $label, false);
$result = str_replace(array(PHP_EOL, "\n"), '_', $result);
$result = str_replace([PHP_EOL, "\n"], '_', $result);
$expected = "_{$label} _string(6) \"string\"__";
$this->assertEquals($expected, $result);
}
Expand All @@ -87,7 +87,7 @@ public function testXdebugEnabledAndNonCliSapiDoesNotEscapeSpecialChars()
}

Debug::setSapi('apache');
$a = array("a" => "b");
$a = ["a" => "b"];

$result = Debug::dump($a, "LABEL", false);
$this->assertContains("<pre>", $result);
Expand All @@ -101,7 +101,7 @@ public function testDebugHaveEscaper()
$escaper = new Escaper;
Debug::setEscaper($escaper);

$a = array("a" => "<script type=\"text/javascript\"");
$a = ["a" => "<script type=\"text/javascript\""];
$result = Debug::dump($a, "LABEL", false);
$this->assertContains("&lt;script type=&quot;text/javascript&quot;&quot;", $result);
}
Expand Down

0 comments on commit 0c4c71c

Please sign in to comment.