Skip to content

Commit

Permalink
Fixed Debugger and ErrorHandler tests in HHVM
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 3, 2015
1 parent 6109d89 commit 20efddf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions tests/TestCase/Error/DebuggerTest.php
Expand Up @@ -83,6 +83,10 @@ public function tearDown()
*/
public function testDocRef()
{
$this->skipIf(
defined('HHVM_VERSION'),
'HHVM does not output doc references'
);
ini_set('docref_root', '');
$this->assertEquals(ini_get('docref_root'), '');
new Debugger();
Expand All @@ -105,6 +109,7 @@ public function testExcerpt()
$this->assertTrue(is_array($result));
$this->assertCount(4, $result);

$this->skipIf(defined('HHVM_VERSION'), 'HHVM does not highlight php code');
$pattern = '/<code>.*?<span style\="color\: \#\d+">.*?&lt;\?php/';
$this->assertRegExp($pattern, $result[0]);

Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Error/ErrorHandlerTest.php
Expand Up @@ -121,7 +121,7 @@ public function testHandleErrorDebugOn()
$this->_restoreError = true;

ob_start();
$wrong .= '';
$wrong = $wrong + 1;
$result = ob_get_clean();

$this->assertRegExp('/<pre class="cake-error">/', $result);
Expand Down Expand Up @@ -199,7 +199,7 @@ public function testHandleErrorDebugOff()
'Notice (8): Undefined variable: out in [' . __FILE__ . ', line ' . (__LINE__ + 3) . ']' . "\n\n"
);

$out .= '';
$out = $out + 1;
}

/**
Expand All @@ -225,7 +225,7 @@ public function testHandleErrorLoggingTrace()
)
);

$out .= '';
$out = $out + 1;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions tests/TestCase/Shell/PluginAssetsShellTest.php
Expand Up @@ -42,6 +42,11 @@ public function setUp()
'Skip PluginAssetsShell tests on windows to prevent side effects for UrlHelper tests on AppVeyor.'
);

$this->skipIf(
defined('HHVM_VERSION'),
'Also broken in HHVM, maybe the tests are wrong?'
);

$this->io = $this->getMock('Cake\Console\ConsoleIo', [], [], '', false);

$this->shell = $this->getMock(
Expand Down

0 comments on commit 20efddf

Please sign in to comment.