class vfsStreamWrapperSetOptionTestCase in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php \org\bovigo\vfs\vfsStreamWrapperSetOptionTestCase
Test for stream_set_option() implementation.
@since 0.10.0 @group issue_15
Hierarchy
- class \org\bovigo\vfs\vfsStreamWrapperSetOptionTestCase extends \org\bovigo\vfs\PHPUnit_Framework_TestCase
Expanded class hierarchy of vfsStreamWrapperSetOptionTestCase
See also
https://github.com/mikey179/vfsStream/issues/15
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperSetOptionTestCase.php, line 18
Namespace
org\bovigo\vfsView source
class vfsStreamWrapperSetOptionTestCase extends \PHPUnit_Framework_TestCase {
/**
* root directory
*
* @var vfsStreamContainer
*/
protected $root;
/**
* set up test environment
*/
public function setUp() {
$this->root = vfsStream::setup();
vfsStream::newFile('foo.txt')
->at($this->root);
}
/**
* @test
*/
public function setBlockingDoesNotWork() {
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$this
->assertFalse(stream_set_blocking($fp, 1));
fclose($fp);
}
/**
* @test
*/
public function removeBlockingDoesNotWork() {
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$this
->assertFalse(stream_set_blocking($fp, 0));
fclose($fp);
}
/**
* @test
*/
public function setTimeoutDoesNotWork() {
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$this
->assertFalse(stream_set_timeout($fp, 1));
fclose($fp);
}
/**
* @test
*/
public function setWriteBufferDoesNotWork() {
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$this
->assertEquals(-1, stream_set_write_buffer($fp, 512));
fclose($fp);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
vfsStreamWrapperSetOptionTestCase:: |
protected | property | root directory | |
vfsStreamWrapperSetOptionTestCase:: |
public | function | @test | |
vfsStreamWrapperSetOptionTestCase:: |
public | function | @test | |
vfsStreamWrapperSetOptionTestCase:: |
public | function | @test | |
vfsStreamWrapperSetOptionTestCase:: |
public | function | set up test environment | |
vfsStreamWrapperSetOptionTestCase:: |
public | function | @test |