Skip to content

Instantly share code, notes, and snippets.

@eth8505
Last active April 25, 2016 19:22
Show Gist options
  • Save eth8505/fe494383ef8458cd8fc60983a86d6c14 to your computer and use it in GitHub Desktop.
Save eth8505/fe494383ef8458cd8fc60983a86d6c14 to your computer and use it in GitHub Desktop.
zend-mime test for PR#4 breaking octets
public function dataTestQuotedPrintableDoesNotBreakOctets() {
return [
[str_repeat('a', Mime\Mime::LINELENGTH - 3) . "=\n=3D.bbb", str_repeat('a', Mime\Mime::LINELENGTH-3) . '=.bbb'],
[str_repeat('.', Mime\Mime::LINELENGTH) . "=\n.", str_repeat('.', Mime\Mime::LINELENGTH + 1)],
[str_repeat(' ', Mime\Mime::LINELENGTH) . "=\n ", str_repeat(' ', Mime\Mime::LINELENGTH + 1)]
];
}
/**
* @dataProvider dataTestQuotedPrintableDoesNotBreakOctets
* @group current
*/
public function testQuotedPrintableDoesNotBreakOctets($expected, $text)
{
$qp = Mime\Mime::encodeQuotedPrintable($text);
$this->assertEquals($expected, $qp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment