File: BugFileByteStreamConsecutiveReadCallsTest.php

package info (click to toggle)
libphp-swiftmailer 6.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,164 kB
  • sloc: php: 27,203; sh: 36; makefile: 16
file content (16 lines) | stat: -rw-r--r-- 434 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

class Swift_BugFileByteStreamConsecutiveReadCallsTest extends \PHPUnit\Framework\TestCase
{
    public function testShouldThrowExceptionOnConsecutiveRead()
    {
        $this->expectException(\Swift_IoException::class);

        $fbs = new \Swift_ByteStream_FileByteStream('does not exist');
        try {
            $fbs->read(100);
        } catch (\Swift_IoException $exc) {
            $fbs->read(100);
        }
    }
}