generated from craftzing/laravel-package-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/enable build #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kjellknapen
wants to merge
15
commits into
main
Choose a base branch
from
feature/enable-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
33e0ec1
Uncomment build and test if it can be called
kjellknapen d0157a9
Add testcase for RenderdEmailTemplate
kjellknapen 7678e77
Add htmlBody function to render template and add it to testcase
kjellknapen d1ada9c
Fix issue with autodiscover for Laravel
kjellknapen ce1561e
Update package for laravel 10
kjellknapen 8464456
Fix phpstan issues
kjellknapen 5353444
Readd old checks
kjellknapen 883bd2f
Try working with newer version
kjellknapen 16c4b48
Use specific version
kjellknapen af8a87a
Fix issue with phpunit config
kjellknapen 318cfc4
Update exclude for older versions
kjellknapen 0ade900
Add some extra types to fix phpstan issues
kjellknapen 2088eff
Fix code style violations
kjellknapen f53d772
Update checkout to v3 for github actions
kjellknapen dfb7f0e
Merge branch 'feature/enable-build' of github.com:craftzing/laravel-p…
kjellknapen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,41 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Craftzing\Laravel\NotificationChannels\Postmark; | ||
|
|
||
| use PHPUnit\Framework\TestCase; | ||
|
|
||
| final class RenderedEmailTemplateMailTest extends TestCase | ||
| { | ||
| /** @test */ | ||
| public function itCanBeConstructedFromRenderedContent(): void | ||
| { | ||
| $subject = 'Some Content Here'; | ||
| $htmlBody = 'Some HTML Content Here'; | ||
| $textBody = 'Some Text Content Here'; | ||
|
|
||
| $mail = RenderedEmailTemplateMail::fromRenderedContent($subject, $htmlBody, $textBody); | ||
|
|
||
| $this->assertSame($subject, $mail->subject); | ||
| $this->assertSame($htmlBody, $mail->htmlBody()); | ||
| $this->assertSame($textBody, $mail->textView); | ||
| } | ||
|
|
||
| /** @test */ | ||
| public function itCanBuildRenderdEmailTemplate(): void | ||
| { | ||
| $subject = 'Some Content Here'; | ||
| $htmlBody = 'Some HTML Content Here'; | ||
| $textBody = 'Some Text Content Here'; | ||
| $mail = RenderedEmailTemplateMail::fromRenderedContent($subject, $htmlBody, $textBody); | ||
|
|
||
| // Laravel needs the build method on the mailable but doesn't use it when faking Mail. | ||
| // For that reason we test it here since it isn't picked up in any other test case. | ||
| $build = $mail->build(); | ||
kjellknapen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| $this->assertSame($subject, $build->subject); | ||
| $this->assertSame($htmlBody, $build->htmlBody()); | ||
| $this->assertSame($textBody, $build->textView); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.