|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +declare(strict_types=1); |
| 4 | + |
3 | 5 | /** |
4 | 6 | * This file is part of CodeIgniter 4 framework. |
5 | 7 | * |
|
11 | 13 |
|
12 | 14 | namespace CodeIgniter\AutoReview; |
13 | 15 |
|
14 | | -use InvalidArgumentException; |
15 | 16 | use PHPUnit\Framework\Attributes\CoversNothing; |
16 | 17 | use PHPUnit\Framework\Attributes\DataProvider; |
17 | 18 | use PHPUnit\Framework\Attributes\Group; |
@@ -65,6 +66,10 @@ public function testCreateNewChangelog(string $mode): void |
65 | 66 | "Version {$newVersion}", |
66 | 67 | $this->getContents("./user_guide_src/source/changelogs/v{$newVersion}.rst"), |
67 | 68 | ); |
| 69 | + $this->assertStringContainsString( |
| 70 | + "**{$newVersion} release of CodeIgniter4**", |
| 71 | + $this->getContents("./user_guide_src/source/changelogs/v{$newVersion}.rst"), |
| 72 | + ); |
68 | 73 | $this->assertStringContainsString( |
69 | 74 | $newVersion, |
70 | 75 | $this->getContents('./user_guide_src/source/changelogs/index.rst'), |
@@ -106,7 +111,7 @@ private function incrementVersion(string $version, string $mode = 'patch'): stri |
106 | 111 | 'major' => sprintf('%d.0.0', ++$parts[0]), |
107 | 112 | 'minor' => sprintf('%d.%d.0', $parts[0], ++$parts[1]), |
108 | 113 | 'patch' => sprintf('%d.%d.%d', $parts[0], $parts[1], ++$parts[2]), |
109 | | - default => throw new InvalidArgumentException('Invalid version increment mode. Use "major", "minor", or "patch".'), |
| 114 | + default => $this->fail('Invalid version increment mode. Use "major", "minor", or "patch".'), |
110 | 115 | }; |
111 | 116 | } |
112 | 117 |
|
|
0 commit comments