Skip to content

Commit

Permalink
fill empty test (laravel#49632)
Browse files Browse the repository at this point in the history
  • Loading branch information
lioneaglesolutions authored and frankiejarrett committed Jan 10, 2024
1 parent 867d3e3 commit b100b8a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/Mail/MailMailableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,38 @@ public function build()

public function testAssertHasSubject()
{
Container::getInstance()->instance('mailer', new class
{
public function render()
{
//
}
});

$mailable = new class() extends Mailable
{
public function build()
{
//
}
};

try {
$mailable->assertHasSubject('Foo Subject');
$this->fail();
} catch (AssertionFailedError $e) {
$this->assertSame("Did not see expected text [Foo Subject] in email subject.\nFailed asserting that false is true.", $e->getMessage());
}

$mailable = new class() extends Mailable
{
public function build()
{
$this->subject('Foo Subject');
}
};

$mailable->assertHasSubject('Foo Subject');
}

public function testMailableHeadersGetSent()
Expand Down

0 comments on commit b100b8a

Please sign in to comment.