Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via composer

mikey179/vfsstream v1.6.11

Virtual file system to mock the real file system in unit tests.
Package summary
Share
0
issues
1
license
1
BSD-3-Clause
Package created
29 Jan 2012
Version published
23 Feb 2022
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
mikey179/vfsstream@v1.6.11
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of mikey179/vfsstream 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does mikey179/vfsstream do?

The mikey179/vfsStream Composer package is designed to provide a virtual file system that can be used in place of the real file system during unit testing. This allows developers to create mock files and directories, isolate tests from the system environment, and simplify the testing process significantly. It thus proves incredibly beneficial for applications making extensive use of the file system.

How do you use mikey179/vfsstream?

To use the mikey179/vfsStream package in your PHP code, you first need to install it via Composer. Here is an example of how you might do this:

composer require mikey179/vfsStream

Once installed, you can import and use it within your unit tests as follows:

Here is a basic usage example:

<?php
require 'vendor/autoload.php';

use org\bovigo\vfs\vfsStream;

$root = vfsStream::setup('root');

$file = vfsStream::newFile('test.txt')->at($root)->setContent('Hello, World!');

The vfsStream::setup('root') call creates a new directory named 'root' on the virtual file system. The next line creates a new file named 'test.txt', places it in the 'root' directory, and sets its content to 'Hello, World!'.

Where are the mikey179/vfsstream docs?

Documentation for the mikey179/vfsStream package can be found on the project's GitHub Wiki. This wiki provides a comprehensive overview of the package, including its functional aspects, installation instructions, usage examples, frequently asked questions, and more. For additional insight, consider visiting the vfsStream Examples repository, which contains practical examples of vfsStream usage.