mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-02-01 09:39:58 +09:00
21 lines
604 B
PHP
21 lines
604 B
PHP
<?php
|
|
|
|
class Swift_Bug274Test extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testEmptyFileNameAsAttachment()
|
|
{
|
|
$message = new Swift_Message();
|
|
$this->setExpectedException('Swift_IoException', 'The path cannot be empty');
|
|
$message->attach(Swift_Attachment::fromPath(''));
|
|
}
|
|
|
|
public function testNonEmptyFileNameAsAttachment()
|
|
{
|
|
$message = new Swift_Message();
|
|
try {
|
|
$message->attach(Swift_Attachment::fromPath(__FILE__));
|
|
} catch (Exception $e) {
|
|
$this->fail('Path should not be empty');
|
|
}
|
|
}
|
|
}
|