3
* This file is part of the PHP_CodeCoverage package.
5
* (c) Sebastian Bergmann <sebastian@phpunit.de>
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
11
if (!defined('TEST_FILES_PATH')) {
14
dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR .
15
'_files' . DIRECTORY_SEPARATOR
19
require_once TEST_FILES_PATH . '../TestCase.php';
22
* Tests for the PHP_CodeCoverage_Report_Clover class.
25
* @package CodeCoverage
27
* @author Sebastian Bergmann <sebastian@phpunit.de>
28
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
29
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
30
* @link http://github.com/sebastianbergmann/php-code-coverage
31
* @since Class available since Release 1.0.0
33
class PHP_CodeCoverage_Report_CloverTest extends PHP_CodeCoverage_TestCase
36
* @covers PHP_CodeCoverage_Report_Clover
38
public function testCloverForBankAccountTest()
40
$clover = new PHP_CodeCoverage_Report_Clover;
42
$this->assertStringMatchesFormatFile(
43
TEST_FILES_PATH . 'BankAccount-clover.xml',
44
$clover->process($this->getCoverageForBankAccount(), null, 'BankAccount')
49
* @covers PHP_CodeCoverage_Report_Clover
51
public function testCloverForFileWithIgnoredLines()
53
$clover = new PHP_CodeCoverage_Report_Clover;
55
$this->assertStringMatchesFormatFile(
56
TEST_FILES_PATH . 'ignored-lines-clover.xml',
57
$clover->process($this->getCoverageForFileWithIgnoredLines())
62
* @covers PHP_CodeCoverage_Report_Clover
64
public function testCloverForClassWithAnonymousFunction()
66
$clover = new PHP_CodeCoverage_Report_Clover;
68
$this->assertStringMatchesFormatFile(
69
TEST_FILES_PATH . 'class-with-anonymous-function-clover.xml',
70
$clover->process($this->getCoverageForClassWithAnonymousFunction())