-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
82 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
namespace Kir\Streams; | ||
|
||
interface RandomAccessStream extends InputStream, OutputStream, SeekableStream { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/Kir/Streams/Helper/MemoryStream.php → ...Kir/Streams/Tests/Helper/MemoryStream.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
tests/Kir/Streams/Helper/StreamFactory.php → ...ir/Streams/Tests/Helper/StreamFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?php | ||
namespace Kir\Streams\Helper; | ||
namespace Kir\Streams\Tests\Helper; | ||
|
||
use Kir\Streams\Stream; | ||
|
||
interface StreamFactory { | ||
/** | ||
* @return Stream | ||
*/ | ||
public function getStream(); | ||
public function createStream(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
namespace Kir\Streams\Tests; | ||
|
||
use Kir\Streams\Tests\Helper\ClosureStreamFactory; | ||
use Kir\Streams\Tests\Helper\NondestructiveReadWriteStream; | ||
use Kir\Streams\Tests\Helper\ResourceStream; | ||
|
||
class RandomAccessStreamTestTest extends ResourceStreamTest { | ||
protected function setUp() { | ||
$factory = new ClosureStreamFactory(function () { | ||
$stream = new ResourceStream(__DIR__.'/../../../../tests/assets/test-data.txt', 'r'); | ||
$stream = new NondestructiveReadWriteStream($stream); | ||
return $stream; | ||
}); | ||
parent::setUp($factory); | ||
} | ||
} | ||
|