Skip to content

Commit

Permalink
Simplify OutputBuffer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdesign authored and kelunik committed Oct 17, 2017
1 parent 48bb2eb commit e00c6d4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/OutputBufferTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Amp\ByteStream\Test;

use Amp\ByteStream\ClosedException;
use Amp\ByteStream\InMemoryStream;
use Amp\ByteStream\OutputBuffer;
use Amp\Loop;
use Amp\PHPUnit\TestCase;
Expand All @@ -15,9 +14,7 @@ public function testWrite() {
$output->write('foo');
$output->end();

$memory = new InMemoryStream(yield $output);

$this->assertSame('foo', yield $memory->read());
$this->assertSame('foo', yield $output);
});
}

Expand All @@ -27,9 +24,7 @@ public function testEnd() {
$output->write('foo');
$output->end('bar');

$memory = new InMemoryStream(yield $output);

$this->assertSame('foobar', yield $memory->read());
$this->assertSame('foobar', yield $output);
});
}

Expand Down

0 comments on commit e00c6d4

Please sign in to comment.