fixup tests

This commit is contained in:
Robin Appelman 2021-03-02 20:07:51 +01:00
commit 1c6d18170e
7 changed files with 25 additions and 20 deletions

View file

@ -1,24 +0,0 @@
<?php
/**
* Copyright (c) 2016 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Licensed under the MIT license:
* http://opensource.org/licenses/MIT
*/
namespace Icewind\Streams\Tests;
class PathWrapper extends \PHPUnit_Framework_TestCase {
private function getDataStream($data) {
$stream = fopen('php://temp', 'w+');
fwrite($stream, $data);
rewind($stream);
return $stream;
}
public function testFileGetContents() {
$data = 'foobar';
$stream = $this->getDataStream($data);
$path = \Icewind\Streams\PathWrapper::getPath($stream);
$this->assertSame($data, file_get_contents($path));
}
}