Skip to content

Commit 28c56d8

Browse files
author
Fabrice Bernhard
committed
Added a test for the Xdebug bug sebastianbergmann#331 by-pass
1 parent 21310e5 commit 28c56d8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/**
4+
* Tests for the PHP_CodeCoverage_Driver_Xdebug class.
5+
*
6+
* @category PHP
7+
* @package CodeCoverage_Driver
8+
* @subpackage Tests
9+
* @author Fabrice Bernhard <[email protected]>
10+
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
11+
* @version Release: @package_version@
12+
* @link http://github.com/sebastianbergmann/php-code-coverage
13+
*/
14+
class PHP_CodeCoverage_Driver_XdebugTest extends PHPUnit_Framework_TestCase
15+
{
16+
/**
17+
* Tests that the Xdebug driver by-passed Xdebug bug #331
18+
* http://bugs.xdebug.org/bug_view_page.php?bug_id=0000331
19+
*
20+
* @covers PHP_CodeCoverage_Driver_Xdebug::cleanFilenames
21+
* @covers PHP_CodeCoverage_Driver_Xdebug::stop
22+
*
23+
*/
24+
public function testCoveredFiles()
25+
{
26+
$driver = new PHP_CodeCoverage_Driver_Xdebug;
27+
$driver->start();
28+
assert('2 >= 0');
29+
$data = $driver->stop();
30+
foreach ($data as $file => $lines) {
31+
$this->assertNotcontains(' : assert code', $file);
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)