Skip to content

Commit

Permalink
Fix tests on PHP > 5.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 29, 2017
1 parent ba256b5 commit 73478ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/TestCase/Error/ExceptionRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function testNormalExceptionRendering()
$this->assertNotEmpty($viewVars['_serialize']);

$expected = ['success', 'data'];
if (version_compare(PHP_VERSION, '5.5.0') >= 0) {
$expected[] = 'queryLog';
}
$actual = $viewVars['_serialize'];
$this->assertEquals($expected, $actual);

Expand Down Expand Up @@ -194,6 +197,9 @@ public function testNormalNestedExceptionRendering()
$this->assertNotEmpty($viewVars['_serialize']);

$expected = ['success', 'data'];
if (version_compare(PHP_VERSION, '5.5.0') >= 0) {
$expected[] = 'queryLog';
}
$actual = $viewVars['_serialize'];
$this->assertEquals($expected, $actual);

Expand Down Expand Up @@ -258,6 +264,9 @@ public function testMissingViewExceptionDuringRendering()
$this->assertNotEmpty($viewVars['_serialize']);

$expected = ['success', 'data'];
if (version_compare(PHP_VERSION, '5.5.0') >= 0) {
$expected[] = 'queryLog';
}
$actual = $viewVars['_serialize'];
$this->assertEquals($expected, $actual);

Expand Down

0 comments on commit 73478ff

Please sign in to comment.