update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -2,14 +2,14 @@
class Swift_Bug274Test extends \PHPUnit_Framework_TestCase
{
public function testEmptyFileNameAsAttachement()
public function testEmptyFileNameAsAttachment()
{
$message = new Swift_Message();
$this->setExpectedException('Swift_IoException', 'The path cannot be empty');
$message->attach(Swift_Attachment::fromPath(''));
}
public function testNonEmptyFileNameAsAttachement()
public function testNonEmptyFileNameAsAttachment()
{
$message = new Swift_Message();
try {

View File

@@ -60,8 +60,8 @@ class Swift_Bug34Test extends \PHPUnit_Framework_TestCase
'--\\1'."\r\n".
'Content-Type: image/gif; name=image.gif'."\r\n".
'Content-Transfer-Encoding: base64'."\r\n".
'Content-Disposition: inline; filename=image.gif'."\r\n".
'Content-ID: <'.$cidVal.'>'."\r\n".
'Content-Disposition: inline; filename=image.gif'."\r\n".
"\r\n".
preg_quote(base64_encode('<image data>'), '~').
"\r\n\r\n".

View File

@@ -57,8 +57,8 @@ class Swift_Bug38Test extends \PHPUnit_Framework_TestCase
'--'.$boundary."\r\n".
'Content-Type: image/gif; name=image.gif'."\r\n".
'Content-Transfer-Encoding: base64'."\r\n".
'Content-Disposition: inline; filename=image.gif'."\r\n".
'Content-ID: <'.preg_quote($imgId, '~').'>'."\r\n".
'Content-Disposition: inline; filename=image.gif'."\r\n".
"\r\n".
preg_quote(base64_encode('<data>'), '~').
"\r\n\r\n".
@@ -106,8 +106,8 @@ class Swift_Bug38Test extends \PHPUnit_Framework_TestCase
'--'.$boundary."\r\n".
'Content-Type: image/gif; name=image.gif'."\r\n".
'Content-Transfer-Encoding: base64'."\r\n".
'Content-Disposition: inline; filename=image.gif'."\r\n".
'Content-ID: <'.preg_quote($imgId, '~').'>'."\r\n".
'Content-Disposition: inline; filename=image.gif'."\r\n".
"\r\n".
preg_quote(base64_encode('<data>'), '~').
"\r\n\r\n".

View File

@@ -0,0 +1,19 @@
<?php
class Swift_FileByteStreamConsecutiveReadCalls extends \PHPUnit_Framework_TestCase
{
/**
* @test
* @expectedException \Swift_IoException
*/
public function shouldThrowExceptionOnConsecutiveRead()
{
$fbs = new \Swift_ByteStream_FileByteStream('does not exist');
try {
$fbs->read(100);
} catch (\Swift_IoException $exc) {
$fbs->read(100);
}
}
}