File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 22
22
},
23
23
"scripts" : {
24
24
"test" : " ./vendor/bin/phpunit --coverage-text --colors" ,
25
- "test-with-report" : " ./vendor/bin/phpunit --configuration phpunit.xml --coverage-clover test-reports/cov.xml"
25
+ "test-with-report" : " ./vendor/bin/phpunit --configuration phpunit.xml --coverage-clover test-reports/cov.xml && php prepare-coverage-report.php "
26
26
}
27
27
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ // Path to the Clover XML file
3
+ $ coverageFile = './test-reports/cov.xml ' ;
4
+
5
+ // Load the file contents
6
+ $ xmlContent = file_get_contents ($ coverageFile );
7
+
8
+ // Replace "/var/www/html" with "."
9
+ $ updatedContent = str_replace ('/var/www/html ' , '. ' , $ xmlContent );
10
+
11
+ // Save the updated content back to the file
12
+ file_put_contents ($ coverageFile , $ updatedContent );
13
+
14
+ echo "Clover report updated successfully! \n" ;
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <coverage generated =" 1724124780 " >
3
- <project timestamp =" 1724124780 " >
2
+ <coverage generated =" 1724126968 " >
3
+ <project timestamp =" 1724126968 " >
4
4
<file name =" ./src/Exceptions/AccessException.php" >
5
5
<class name =" Brispot\PhpLib\Exceptions\AccessException" namespace =" global" >
6
6
<metrics complexity =" 1" methods =" 1" coveredmethods =" 1" conditionals =" 0" coveredconditionals =" 0" statements =" 5" coveredstatements =" 5" elements =" 6" coveredelements =" 6" />
You can’t perform that action at this time.
0 commit comments