tests/unit/IO/FileReaderTest.php 1 location
|
@@ 98-109 (lines=12) @@
|
95 |
|
} |
96 |
|
} |
97 |
|
|
98 |
|
public function testNodeWithNoFormatAndNoFormatSpecifiedWillThrowAnException() |
99 |
|
{ |
100 |
|
$stream = m::mock(StreamInterface::class); |
101 |
|
|
102 |
|
$file = m::mock(FileNodeInterface::class, NodeStreamInterface::class); |
103 |
|
$file->shouldReceive('getStream') |
104 |
|
->with('r') |
105 |
|
->andReturn($stream); |
106 |
|
|
107 |
|
static::expectException(InvalidArgumentException::class); |
108 |
|
new FileReader($file); |
109 |
|
} |
110 |
|
|
111 |
|
public function testNodeWithFormatWillUseThatFormat() |
112 |
|
{ |
tests/unit/IO/FileWriterTest.php 1 location
|
@@ 58-69 (lines=12) @@
|
55 |
|
new FileWriter($file); |
56 |
|
} |
57 |
|
|
58 |
|
public function testNodeWithNoFormatAndNoFormatSpecifiedWillThrowAnException() |
59 |
|
{ |
60 |
|
$stream = m::mock(StreamInterface::class); |
61 |
|
|
62 |
|
$file = m::mock(FileNodeInterface::class, NodeStreamInterface::class); |
63 |
|
$file->shouldReceive('getStream') |
64 |
|
->with('a+') |
65 |
|
->andReturn($stream); |
66 |
|
|
67 |
|
static::expectException(InvalidArgumentException::class); |
68 |
|
new FileWriter($file); |
69 |
|
} |
70 |
|
|
71 |
|
public function testNodeWithFormatWillUseThatFormat() |
72 |
|
{ |