mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 16:44:07 +02:00
Extend test cases as bit
This commit is contained in:
parent
6b13abb570
commit
e2e41824dc
2 changed files with 14 additions and 0 deletions
|
|
@ -20,6 +20,13 @@ class CallbackWrapper extends Wrapper {
|
||||||
return \Icewind\Streams\CallbackWrapper::wrap($source, $read, $write, $close);
|
return \Icewind\Streams\CallbackWrapper::wrap($source, $read, $write, $close);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException \BadMethodCallException
|
||||||
|
*/
|
||||||
|
public function testWrapInvalidSource() {
|
||||||
|
$this->wrapSource('foo');
|
||||||
|
}
|
||||||
|
|
||||||
public function testReadCallback() {
|
public function testReadCallback() {
|
||||||
$called = false;
|
$called = false;
|
||||||
$callBack = function () use (&$called) {
|
$callBack = function () use (&$called) {
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,11 @@ class NullWrapper extends Wrapper {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException \BadMethodCallException
|
||||||
|
*/
|
||||||
|
public function testWrapInvalidSource() {
|
||||||
|
$this->wrapSource('foo');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue