-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathReportServiceTest.php
More file actions
58 lines (50 loc) · 1.52 KB
/
ReportServiceTest.php
File metadata and controls
58 lines (50 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Report Service
*
* @copyright 2013 Anthon Pang
* @license BSD-2-Clause
*/
namespace LeanPHP\Behat\CodeCoverage\Service;
use VIPSoft\TestCase;
/**
* Report service test
*
* @group Unit
*
class ReportServiceTest extends TestCase
{
public function __construct()
{
if ( ! class_exists('LeanPHP\Behat\CodeCoverage\Test\PHP_CodeCoverage_Report_HTML')) {
eval(<<<END_OF_SQLITE
namespace LeanPHP\Behat\CodeCoverage\Test {
class PHP_CodeCoverage_Report_HTML
{
static public \$proxiedMethods;
public function __call(\$methodName, \$args)
{
if (isset(self::\$proxiedMethods[\$methodName])) {
return call_user_func_array(self::\$proxiedMethods[\$methodName], \$args);
}
}
}
}
END_OF_SQLITE
);
}
}
public function testGenerateReport()
{
$report = $this->getMockBuilder('LeanPHP\Behat\CodeCoverage\Common\Report\Html')
->disableOriginalConstructor()
->getMock();
$factory = $this->createMock('LeanPHP\Behat\CodeCoverage\Common\Report\Factory');
$factory->expects($this->once())
->method('create')
->will($this->returnValue($report));
$coverage = $this->createMock('SebastianBergmann\CodeCoverage\CodeCoverage');
$service = new ReportService(array('report' => array('format' => 'html', 'options' => array())), $factory);
$service->generateReport($coverage);
}
}*/