mirror of
https://github.com/PHPMailer/PHPMailer.git
synced 2024-09-20 01:52:15 +02:00
EncodeStringTest: fix incorrect assertion
Using a regex assertion with arbitrary input data which is not regex escaped, makes this test suspect. From the looks of it, the test _should_ be testing that the output is the _same_, so let's use that assertion.
This commit is contained in:
parent
7c8d3f21b2
commit
2380a16f5e
@ -35,8 +35,8 @@ final class EncodeStringTest extends TestCase
|
||||
$this->Mail->ErrorInfo = '';
|
||||
$this->Mail->encodeString('hello', 'asdfghjkl');
|
||||
self::assertNotEmpty($this->Mail->ErrorInfo, 'Invalid encoding not detected');
|
||||
self::assertMatchesRegularExpression(
|
||||
'/' . base64_encode('hello') . '/',
|
||||
self::assertSame(
|
||||
base64_encode('hello') . PHPMailer::getLE(),
|
||||
$this->Mail->encodeString('hello')
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user