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\Crap4j 17 */ 18class Crap4jTest extends TestCase 19{ 20 public function testForBankAccountTest() 21 { 22 $crap4j = new Crap4j; 23 24 $this->assertStringMatchesFormatFile( 25 TEST_FILES_PATH . 'BankAccount-crap4j.xml', 26 $crap4j->process($this->getCoverageForBankAccount(), null, 'BankAccount') 27 ); 28 } 29 30 public function testForFileWithIgnoredLines() 31 { 32 $crap4j = new Crap4j; 33 34 $this->assertStringMatchesFormatFile( 35 TEST_FILES_PATH . 'ignored-lines-crap4j.xml', 36 $crap4j->process($this->getCoverageForFileWithIgnoredLines(), null, 'CoverageForFileWithIgnoredLines') 37 ); 38 } 39 40 public function testForClassWithAnonymousFunction() 41 { 42 $crap4j = new Crap4j; 43 44 $this->assertStringMatchesFormatFile( 45 TEST_FILES_PATH . 'class-with-anonymous-function-crap4j.xml', 46 $crap4j->process($this->getCoverageForClassWithAnonymousFunction(), null, 'CoverageForClassWithAnonymousFunction') 47 ); 48 } 49} 50