Skip to content

Commit

Permalink
fixup! Expand StreamInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubboucek committed Jun 18, 2023
1 parent 9cd27b1 commit 02e3efb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use JakubBoucek\Tar\File;
use JakubBoucek\Tar\Parser\Header;
use JakubBoucek\Tar\Parser\LightStreamInterface;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\StreamInterface;

Expand All @@ -19,7 +20,7 @@ class FileTest extends TestCase
public function test__toString(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('getName')->willReturn(self::TestName);

Expand All @@ -31,7 +32,7 @@ public function test__toString(): void
public function testGetName(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('getName')->willReturn(self::TestName);

Expand All @@ -43,7 +44,7 @@ public function testGetName(): void
public function testGetType(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('getType')->willReturn(self::TestType);

Expand All @@ -55,7 +56,7 @@ public function testGetType(): void
public function testIsFile(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('isFile')->willReturn(true);

Expand All @@ -67,7 +68,7 @@ public function testIsFile(): void
public function testIsDir(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('isDir')->willReturn(true);

Expand All @@ -79,7 +80,7 @@ public function testIsDir(): void
public function testGetSize(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('getSize')->willReturn(self::TestSize);

Expand All @@ -91,7 +92,7 @@ public function testGetSize(): void
public function testGetContent(): void
{
$header = $this->createStub(Header::class);
$stream = $this->createStub(StreamInterface::class);
$stream = $this->createStub(LightStreamInterface::class);

$header->method('getName')->willReturn(self::TestContent);

Expand Down

0 comments on commit 02e3efb

Please sign in to comment.