generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Showing
13 changed files
with
148 additions
and
51 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,14 @@ | |
->assertDontSee('[email protected]') | ||
->assertDontSee('John Doe'); | ||
}); | ||
|
||
it('can render the submit button using the default translation string') | ||
->blade('<x-support-bubble />') | ||
->assertSee('Submit'); | ||
|
||
it('can be renderd using right-to-left in the correct place', function () { | ||
config()->set('support-bubble.direction', 'right-to-left'); | ||
test()->blade('<x-support-bubble />') | ||
->assertSee('spatie-support-bubble') | ||
->assertSee('-translate-x-full'); | ||
}); |
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 |
---|---|---|
|
@@ -37,14 +37,28 @@ | |
}); | ||
|
||
it('can be rendered', function () { | ||
$allValues = formValues() + [ | ||
'ip' => '1.2.3.4', | ||
'userAgent' => 'my-browser', | ||
]; | ||
$allValues = formValues([ | ||
'ip' => '1.2.3.4', | ||
'userAgent' => 'my-browser', | ||
]); | ||
|
||
$notification = new BubbleResponseNotification(...$allValues); | ||
|
||
$html = (string)$notification->toMail(new AnonymousNotifiable())->render(); | ||
|
||
expect($html)->toContain('left a new message'); | ||
expect($html)->toContain('John Doe ([email protected]) left a new message'); | ||
}); | ||
|
||
it('can render a shorter mail when a name is missing', function () { | ||
$allValues = formValues([ | ||
'name' => null, | ||
'ip' => '1.2.3.4', | ||
'userAgent' => 'my-browser', | ||
]); | ||
|
||
$notification = new BubbleResponseNotification(...$allValues); | ||
|
||
$html = (string)$notification->toMail(new AnonymousNotifiable())->render(); | ||
|
||
expect($html)->toContain('[email protected] left a new message'); | ||
}); |
Oops, something went wrong.