Download the PHP package ralphjsmit/pest-plugin-filesystem without Composer

On this page you can find all versions of the php package ralphjsmit/pest-plugin-filesystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pest-plugin-filesystem

Handy filesystem helpers for your Pest tests

Testing with Pest is an absolute pleasure, but sometimes you just need that little bit extra. In my case, that extra was a set of expectations and functions to interact with the filesystem and make assertions on it. Below I made a list with all the helpers currently available. Enjoy!

[!IMPORTANT]
This package will only work for Pest V1 and not for Pest V2.

Contents

  1. Expectations
    1. expect(...)->toHaveContents()
    2. expect(...)->toExist()
    3. expect(...)->toHaveNamespace()
  2. Higher-order expectations
    1. expect(...)->contents->toBe(...)
  3. Functions
    1. rm($path, $allowNonExisting)
    2. rmdir_recursive($dir)
    3. contents($path)
    4. expectFailedAssertion()

Expectations

expect(...)->toHaveContents()

Test whether a file has certain contents:

expect(...)->toExist()

Test whether a file exists:

expect(...)->toHaveNamespace()

Test whether a file has a certain namespace (PHP-only):

Higher-order expectations

expect(...)->contents->toBe(...)

Make assertions on the contents of a file:

Functions

rm($path, $allowNonExisting)

Completely remove a file or directory:

rmdir_recursive($dir)

This function recursively deletes a folder, including its contents. Internally this is used by the rm() function:

contents($path)

Gets the file contents of a certain file. Its simply a shorter wrapper for file_get_contents():

expectFailedAssertion()

Note that this helper will be added to another package soon and thus be removed here.

Expect a failed assertion. Helpful for testing your own custom Pest assertions:

General

🐞 If you spot a bug, please submit a detailed issue and I'll try to fix it as soon as possible.

🔐 If you discover a vulnerability, please review our security policy.

🙌 If you want to contribute, please submit a pull request. All PRs will be fully credited. If you're unsure whether I'd accept your idea, feel free to contact me!

🙋‍♂️ Ralph J. Smit


All versions of pest-plugin-filesystem with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^8.76|^9.0|^10.0
pestphp/pest Version ^1.17
pestphp/pest-plugin Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ralphjsmit/pest-plugin-filesystem contains the following files

Loading the files please wait ....