1717
1818namespace JBZoo \PHPUnit ;
1919
20+ use JBZoo \CiReportConverter \Converters \Map ;
2021use JBZoo \MermaidPHP \Graph ;
2122use JBZoo \MermaidPHP \Helper ;
2223use JBZoo \MermaidPHP \Link ;
2324use JBZoo \MermaidPHP \Node ;
24- use JBZoo \CiReportConverter \Converters \Map ;
2525
2626/**
2727 * Class CiReportConverterReadmeTest
@@ -35,6 +35,26 @@ class CiReportConverterReadmeTest extends AbstractReadmeTest
3535 */
3636 protected $ packageName = 'CI-Report-Converter ' ;
3737
38+ /**
39+ * @var string[]
40+ */
41+ protected $ badgesTemplate = [
42+ 'travis ' ,
43+ 'github_actions ' ,
44+ 'docker_build ' ,
45+ 'coveralls ' ,
46+ 'psalm_coverage ' ,
47+ 'scrutinizer ' ,
48+ 'strict_types ' ,
49+ '__BR__ ' ,
50+ 'php_version ' ,
51+ 'latest_stable_version ' ,
52+ 'total_downloads ' ,
53+ 'docker_pulls ' ,
54+ 'github_issues ' ,
55+ 'github_license ' ,
56+ ];
57+
3858 /**
3959 * @inheritDoc
4060 */
@@ -43,6 +63,11 @@ protected function setUp(): void
4363 parent ::setUp ();
4464
4565 $ this ->params ['strict_types ' ] = true ;
66+ $ this ->params ['docker_build ' ] = true ;
67+ $ this ->params ['docker_pulls ' ] = true ;
68+ $ this ->params ['github_actions ' ] = true ;
69+ $ this ->params ['scrutinizer ' ] = true ;
70+ $ this ->params ['php_version ' ] = true ;
4671 }
4772
4873 /**
@@ -51,12 +76,36 @@ protected function setUp(): void
5176 protected function checkBadgeTravis (): ?string
5277 {
5378 return $ this ->getPreparedBadge ($ this ->getBadge (
54- 'Build Status ' ,
79+ 'Travis ' ,
5580 'https://travis-ci.org/__VENDOR_ORIG__/__PACKAGE_ORIG__.svg?branch=master ' ,
5681 'https://travis-ci.org/__VENDOR_ORIG__/__PACKAGE_ORIG__ '
5782 ));
5883 }
5984
85+ /**
86+ * @return string|null
87+ */
88+ protected function checkBadgeGithubActions (): ?string
89+ {
90+ return $ this ->getPreparedBadge ($ this ->getBadge (
91+ 'CI ' ,
92+ 'https://github.com/__VENDOR_ORIG__/__PACKAGE_ORIG__/actions/workflows/main.yml/badge.svg?branch=master ' ,
93+ 'https://github.com/__VENDOR_ORIG__/__PACKAGE_ORIG__/actions/workflows/main.yml '
94+ ));
95+ }
96+
97+ /**
98+ * @return string|null
99+ */
100+ protected function checkBadgePhpVersion (): ?string
101+ {
102+ return $ this ->getPreparedBadge ($ this ->getBadge (
103+ 'PHP Version ' ,
104+ 'https://img.shields.io/packagist/php-v/__VENDOR__/__PACKAGE__ ' ,
105+ 'https://github.com/__VENDOR_ORIG__/__PACKAGE_ORIG__/blob/master/composer.json '
106+ ));
107+ }
108+
60109 public function testMapTable ()
61110 {
62111 isFileContains (Map::getMarkdownTable (), PROJECT_ROOT . '/README.md ' );
0 commit comments