adjust tests to new phpunit

This commit is contained in:
Robin Appelman 2021-03-02 19:25:27 +01:00
commit a0abe86651
9 changed files with 97 additions and 23 deletions

View file

@ -17,10 +17,8 @@ class NullWrapperTest extends WrapperTest {
return \Icewind\Streams\NullWrapper::wrap($source);
}
/**
* @expectedException \BadMethodCallException
*/
public function testNoContext() {
$this->expectException(\BadMethodCallException::class);
stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
$context = stream_context_create(array());
try {
@ -32,10 +30,8 @@ class NullWrapperTest extends WrapperTest {
}
}
/**
* @expectedException \BadMethodCallException
*/
public function testNoSource() {
$this->expectException(\BadMethodCallException::class);
stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
$context = stream_context_create(array(
'null' => array(
@ -50,10 +46,8 @@ class NullWrapperTest extends WrapperTest {
}
}
/**
* @expectedException \BadMethodCallException
*/
public function testWrapInvalidSource() {
$this->expectException(\BadMethodCallException::class);
$this->wrapSource('foo');
}
}