Skip to content

Commit f782469

Browse files
Jason-Morcosjdavidbakr
authored andcommitted
Cleanup the CC header recipient check to check for exact proper parsing of the CC header value
1 parent abf9aad commit f782469

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tests/MailTrackerTest.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ public function it_retrieves_long_header_data()
10621062
/**
10631063
* @test
10641064
*/
1065-
public function it_retrieves_multiple_ccs_header_data()
1065+
public function it_retrieves_multiple_cc_recipients_from_header_data()
10661066
{
10671067
$faker = Factory::create();
10681068
$email = $faker->email;
@@ -1097,8 +1097,19 @@ public function it_retrieves_multiple_ccs_header_data()
10971097
}
10981098

10991099
$track = SentEmail::orderBy('id', 'desc')->first();
1100-
$this->assertStringContainsString("cc.averylongemail1@johndoe.com", $track->getHeader('Cc'));
1101-
$this->assertStringContainsString("cc.averylongemail9@johndoe.com", $track->getHeader('Cc'));
1100+
1101+
$this->assertEquals(
1102+
'CC This Person With a Long Name 1 <cc.averylongemail1@johndoe.com>, ' .
1103+
'CC This Person With a Long Name 2 <cc.averylongemail2@johndoe.com>, ' .
1104+
'CC This Person With a Long Name 3 <cc.averylongemail3@johndoe.com>, ' .
1105+
'CC This Person With a Long Name 4 <cc.averylongemail4@johndoe.com>, ' .
1106+
'CC This Person With a Long Name 5 <cc.averylongemail5@johndoe.com>, ' .
1107+
'CC This Person With a Long Name 6 <cc.averylongemail6@johndoe.com>, ' .
1108+
'CC This Person With a Long Name 7 <cc.averylongemail7@johndoe.com>, ' .
1109+
'CC This Person With a Long Name 8 <cc.averylongemail8@johndoe.com>, ' .
1110+
'CC This Person With a Long Name 9 <cc.averylongemail9@johndoe.com>',
1111+
$track->getHeader('Cc')
1112+
);
11021113
}
11031114

11041115
/**

0 commit comments

Comments
 (0)