Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8224540
SignupVerificationTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
SignupVerificationTest.php
View Options
<?php
namespace
Tests\Unit\Mail
;
use
App\Mail\SignupVerification
;
use
App\SignupCode
;
use
Tests\TestCase
;
class
SignupVerificationTest
extends
TestCase
{
/**
* Test email content
*
* @return void
*/
public
function
testSignupVerificationBuild
()
{
$code
=
new
SignupCode
([
'code'
=>
'code'
,
'short_code'
=>
'short-code'
,
'data'
=>
[
'email'
=>
'test@email'
,
'name'
=>
'Test Name'
,
],
]);
$mail
=
new
SignupVerification
(
$code
);
$html
=
$mail
->
build
()->
render
();
$url
=
\config
(
'app.url'
)
.
'/signup/'
.
$code
->
short_code
.
'-'
.
$code
->
code
;
$link
=
"<a href=
\"
$url
\"
>$url</a>"
;
$this
->
assertSame
(
\config
(
'app.name'
)
.
' Registration'
,
$mail
->
subject
);
$this
->
assertStringStartsWith
(
'<!DOCTYPE html>'
,
$html
);
$this
->
assertTrue
(
strpos
(
$html
,
$link
)
>
0
);
$this
->
assertTrue
(
strpos
(
$html
,
$code
->
data
[
'name'
])
>
0
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Jul 10, 12:09 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1057114
Default Alt Text
SignupVerificationTest.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment