PHPackages                             expect/expect-filesystem - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. expect/expect-filesystem

ActiveLibrary[Testing &amp; Quality](/categories/testing)

expect/expect-filesystem
========================

File system matcher for expect

2.0.0(9y ago)018MITPHPPHP &gt;=5.6.0

Since Apr 2Pushed 9y agoCompare

[ Source](https://github.com/expectation-php/expect-filesystem)[ Packagist](https://packagist.org/packages/expect/expect-filesystem)[ RSS](/packages/expect-expect-filesystem/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (11)Used By (0)

expect-filesystem
=================

[](#expect-filesystem)

[![Build Status](https://camo.githubusercontent.com/4b8390879c45952bd1b346760d81bfbc16875b2aafd3b490be00056a2b3948c5/68747470733a2f2f7472617669732d63692e6f72672f6578706563746174696f6e2d7068702f6578706563742d66696c6573797374656d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/expectation-php/expect-filesystem)[![HHVM Status](https://camo.githubusercontent.com/d80bf01645beec512ed524cf93f33daaab92ecf6437c60b111115c7068497de1/687474703a2f2f6868766d2e683463632e64652f62616467652f6578706563742f6578706563742d66696c6573797374656d2e737667)](http://hhvm.h4cc.de/package/expect/expect-filesystem)[![Coverage Status](https://camo.githubusercontent.com/cade4480bc6e03468d828bb6ce4a4c46b2124514724b5a29aa6002da870d9b36/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6578706563746174696f6e2d7068702f6578706563742d66696c6573797374656d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/expectation-php/expect-filesystem?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/17987e8c3ace220cf4960fc72aeffb9588edab287fd47cdd0b82794d32dd5ac9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6578706563746174696f6e2d7068702f6578706563742d66696c6573797374656d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/expectation-php/expect-filesystem/?branch=master)[![Dependency Status](https://camo.githubusercontent.com/010a684a0b2a80375fedbd1a1d2b9435182158966e1bd7c177fecadf5b972149/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535316665623961393731663738343333393030303333632f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/551feb9a971f78433900033c)

Basic usage
-----------

[](#basic-usage)

Create a configuration file of **expect**.
The format of the file is [toml](https://github.com/toml-lang/toml).

```
packages = [
  "expect\\filesystem\\FileSystem"
]
```

Load the configuration file that you created.

```
use expect\Expect;
use expect\configurator\FileConfigurator;

$configurator = new FileConfigurator(__DIR__ . '/.expect.toml');
Expect::configure($configurator);

Expect::that('log.txt')->toBeExists(); //pass
Expect::that('not_found_log.txt')->toBeExists(); //failed
```

All of matcher
--------------

[](#all-of-matcher)

### toBeExists

[](#tobeexists)

```
Expect::that($file)->toBeExists();
```

### toBeReadable

[](#tobereadable)

```
Expect::that($file)->toBeReadable();
```

### toBeWritable

[](#tobewritable)

```
Expect::that($file)->toBeWritable();
```

### toBeExecutable

[](#tobeexecutable)

```
Expect::that($file)->toBeExecutable();
```

### toBeDirectory

[](#tobedirectory)

```
Expect::that($file)->toBeDirectory();
```

### toBeFile

[](#tobefile)

```
Expect::that($file)->toBeFile();
```

### toBeMode

[](#tobemode)

```
Expect::that($file)->toBeMode(644);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~116 days

Total

8

Last Release

3569d ago

Major Versions

0.2.0 → 1.0.02015-05-01

1.0.3 → 2.0.02016-08-10

PHP version history (3 changes)0.2.0PHP &gt;=5.4.0

1.0.0PHP &gt;=5.5.0

2.0.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c299d6d6015ee714954aa05e4d0e9c7b1d31318a5d7db5e9bb4e1f70f78afc?d=identicon)[holyshared](/maintainers/holyshared)

---

Top Contributors

[![holyshared](https://avatars.githubusercontent.com/u/167190?v=4)](https://github.com/holyshared "holyshared (52 commits)")

---

Tags

testBDDassertfiledirectoryspecexpect

### Embed Badge

![Health badge](/badges/expect-expect-filesystem/health.svg)

```
[![Health](https://phpackages.com/badges/expect-expect-filesystem/health.svg)](https://phpackages.com/packages/expect-expect-filesystem)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[php-mock/php-mock-phpunit

Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.

1718.2M399](/packages/php-mock-php-mock-phpunit)[polishsymfonycommunity/symfony-mocker-container

Provides base Symfony dependency injection container enabling service mocking.

1468.0M237](/packages/polishsymfonycommunity-symfony-mocker-container)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
