newBlock() публичный статический Метод

returns a new block with the given name
public static newBlock ( string $name, integer $permissions = null ) : org\bovigo\vfs\vfsStreamBlock
$name string name of the block device
$permissions integer permissions of block to create
Результат org\bovigo\vfs\vfsStreamBlock
 /**
  * @test
  */
 public function visitFileWritesBlockDeviceToStream()
 {
     $output = vfsStream::newFile('foo.txt')->at(vfsStream::setup());
     $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
     $this->assertSame($printVisitor, $printVisitor->visitBlockDevice(vfsStream::newBlock('bar')));
     $this->assertEquals("- [bar]\n", $output->getContent());
 }
 /**
  * @test
  */
 public function visitFileCreatesStructureForBlock()
 {
     $structureVisitor = new vfsStreamStructureVisitor();
     $this->assertEquals(array('[foo]' => 'test'), $structureVisitor->visitBlockDevice(vfsStream::newBlock('foo')->withContent('test'))->getStructure());
 }