Page MenuHomePhorge

SignupVerificationTest.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

SignupVerificationTest.php

<?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

Mime Type
text/x-php
Expires
Thu, Jul 9, 9:15 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1057114
Default Alt Text
SignupVerificationTest.php (1 KB)

Event Timeline