1<?php
2/*
3 * This file is part of the php-code-coverage package.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10
11namespace SebastianBergmann\CodeCoverage\Report;
12
13use SebastianBergmann\CodeCoverage\TestCase;
14
15/**
16 * @covers SebastianBergmann\CodeCoverage\Report\Clover
17 */
18class CloverTest extends TestCase
19{
20    public function testCloverForBankAccountTest()
21    {
22        $clover = new Clover;
23
24        $this->assertStringMatchesFormatFile(
25            TEST_FILES_PATH . 'BankAccount-clover.xml',
26            $clover->process($this->getCoverageForBankAccount(), null, 'BankAccount')
27        );
28    }
29
30    public function testCloverForFileWithIgnoredLines()
31    {
32        $clover = new Clover;
33
34        $this->assertStringMatchesFormatFile(
35            TEST_FILES_PATH . 'ignored-lines-clover.xml',
36            $clover->process($this->getCoverageForFileWithIgnoredLines())
37        );
38    }
39
40    public function testCloverForClassWithAnonymousFunction()
41    {
42        $clover = new Clover;
43
44        $this->assertStringMatchesFormatFile(
45            TEST_FILES_PATH . 'class-with-anonymous-function-clover.xml',
46            $clover->process($this->getCoverageForClassWithAnonymousFunction())
47        );
48    }
49}
50