-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8814b1
commit bebea61
Showing
10 changed files
with
112 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
utils-tests/ChangelogGenerator/Changelog/ChangelogContentsFactoryTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Utils\Tests\ChangelogGenerator\Changelog; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Rector\Utils\ChangelogGenerator\Changelog\ChangelogContentsFactory; | ||
|
||
final class ChangelogContentsFactoryTest extends TestCase | ||
{ | ||
private ChangelogContentsFactory $changelogContentsFactory; | ||
|
||
protected function setUp(): void | ||
{ | ||
$this->changelogContentsFactory = new ChangelogContentsFactory(); | ||
} | ||
|
||
public function test(): void | ||
{ | ||
$changelogLines = [ | ||
'* Add new rule', | ||
'* Fix bug', | ||
'* Fixed another bug', | ||
'* Enable PHPStan on tests as well + add "unused public" ([#3238](https://github.com/rectorphp/rector-src/pull/3238))', | ||
]; | ||
|
||
$generatedChangelogContents = $this->changelogContentsFactory->create($changelogLines); | ||
|
||
$this->assertStringEqualsFile(__DIR__ . '/Fixture/generated_changelog.md', $generatedChangelogContents); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
utils-tests/ChangelogGenerator/Changelog/Fixture/generated_changelog.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## New Features :partying_face: | ||
|
||
* Add new rule | ||
|
||
<br> | ||
|
||
## Bugfixes :bug: | ||
|
||
* Fix bug | ||
* Fixed another bug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters