File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace PH7 \PhpReadmeGeneratorFile \Tests \Command \Markdown ;
6+
7+ use PH7 \PhpReadmeGeneratorFile \Command \Markdown \License ;
8+ use PHPUnit \Framework \TestCase ;
9+
10+ class LicenseTest extends TestCase
11+ {
12+ /**
13+ * @dataProvider licenseCodeProvider
14+ */
15+ public function testLinkWithValidLicenseCode (string $ licenseCode ): void
16+ {
17+ $ actual = License::getLicenseLink ($ licenseCode );
18+ $ this ->assertsame ("https://opensource.org/licenses/ {$ licenseCode }" , $ actual );
19+ }
20+
21+ public function testLinkWithInvalidLicenseCode (): void
22+ {
23+ $ actual = License::getLicenseLink ('INVALID ' );
24+ $ this ->assertsame ('https://opensource.org/licenses ' , $ actual );
25+ }
26+
27+ public function licenseCodeProvider (): array
28+ {
29+ return [License::CODES ];
30+ }
31+
32+ }
You can’t perform that action at this time.
0 commit comments