Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Unit/Mail/PasswordResetTest.php
Show All 29 Lines | public function testPasswordResetBuild() | ||||
$html = $mail->build()->render(); | $html = $mail->build()->render(); | ||||
$url = \config('app.url') . '/login/reset/' . $code->short_code . '-' . $code->code; | $url = \config('app.url') . '/login/reset/' . $code->short_code . '-' . $code->code; | ||||
$link = "<a href=\"$url\">$url</a>"; | $link = "<a href=\"$url\">$url</a>"; | ||||
$this->assertSame(\config('app.name') . ' Password Reset', $mail->subject); | $this->assertSame(\config('app.name') . ' Password Reset', $mail->subject); | ||||
$this->assertStringStartsWith('<!DOCTYPE html>', $html); | $this->assertStringStartsWith('<!DOCTYPE html>', $html); | ||||
$this->assertTrue(strpos($html, $link) > 0); | $this->assertTrue(strpos($html, $link) > 0); | ||||
$this->assertTrue(strpos($html, $code->user->name) > 0); | $this->assertTrue(strpos($html, $code->user->name(true)) > 0); | ||||
} | } | ||||
} | } |