summaryrefslogtreecommitdiff
path: root/vendor/swiftmailer/swiftmailer/tests/bug/Swift/BugFileByteStreamConsecutiveReadCallsTest.php
blob: 35733ec55a60d0e486ffc5f0b5ead2e6dcee2836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
        }
    }
}