Skip to content

Commit

Permalink
Merge pull request #42 from Tobion/patch-1
Browse files Browse the repository at this point in the history
file mode validation cannot be implemented according to PSR-17
  • Loading branch information
shadowhand committed Jun 26, 2019
2 parents 9c97cac + 8a0dea9 commit 92d8b91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/StreamFactoryTestCase.php
Expand Up @@ -2,6 +2,7 @@

namespace Interop\Http\Factory;

use Exception;
use InvalidArgumentException;
use RuntimeException;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -119,15 +120,15 @@ public function testCreateStreamFromFileWithNoMode()
{
$filename = $this->createTemporaryFile();

$this->expectException(InvalidArgumentException::class);
$this->expectException(Exception::class);
$stream = $this->factory->createStreamFromFile($filename, '');
}

public function testCreateStreamFromFileWithInvalidMode()
{
$filename = $this->createTemporaryFile();

$this->expectException(InvalidArgumentException::class);
$this->expectException(Exception::class);
$stream = $this->factory->createStreamFromFile($filename, "\u{2620}");
}

Expand Down

0 comments on commit 92d8b91

Please sign in to comment.