Skip to content

Commit 3773353

Browse files
committed
Fix errors due to RuntimeException
1 parent b9d5161 commit 3773353

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Common/Driver/HHVM.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class HHVM implements DriverInterface
2323
/**
2424
* Constructor
2525
*
26-
* @throws SebastianBergmann\CodeCoverage\Exception if PHP code coverage not enabled
26+
* @throws SebastianBergmann\CodeCoverage\RuntimeException if PHP code coverage not enabled
2727
*/
2828
public function __construct()
2929
{
3030
if ( ! defined('HPHP_VERSION')) {
31-
throw new \SebastianBergmann\CodeCoverage\Exception('This driver requires HHVM');
31+
throw new \SebastianBergmann\CodeCoverage\RuntimeException('This driver requires HHVM');
3232
}
3333
}
3434

src/Common/Driver/XCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class XCache implements DriverInterface
2222
/**
2323
* Constructor
2424
*
25-
* @throws \PHP_CodeCoverage_Exception if PHP code coverage not enabled
25+
* @throws \SebastianBergmann\CodeCoverage\RuntimeException if PHP code coverage not enabled
2626
*/
2727
public function __construct()
2828
{
2929
if ( ! extension_loaded('xcache')) {
30-
throw new \SebastianBergmann\CodeCoverage\Exception('This driver requires XCache');
30+
throw new \SebastianBergmann\CodeCoverage\RuntimeException('This driver requires XCache');
3131
}
3232

3333
if (version_compare(phpversion('xcache'), '1.2.0', '<') ||

tests/Common/Driver/HHVMTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testConstructNotHHVM()
2929

3030
$this->fail();
3131
} catch (\Exception $e) {
32-
$this->assertTrue($e instanceof \SebastianBergmann\CodeCoverage\Exception);
32+
$this->assertTrue($e instanceof \SebastianBergmann\CodeCoverage\RuntimeException);
3333
$this->assertEquals('This driver requires HHVM', $e->getMessage());
3434
}
3535
}

tests/Common/Driver/XCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testConstructNoExtensions()
2929

3030
$this->fail();
3131
} catch (\Exception $e) {
32-
$this->assertTrue($e instanceof \SebastianBergmann\CodeCoverage\Exception);
32+
$this->assertTrue($e instanceof \SebastianBergmann\CodeCoverage\RuntimeException);
3333
$this->assertEquals('This driver requires XCache', $e->getMessage());
3434
}
3535
}

0 commit comments

Comments
 (0)