{"id":18766207,"url":"https://github.com/bbatsche/filesystem-assertions","last_synced_at":"2026-05-07T07:41:05.448Z","repository":{"id":42008948,"uuid":"482408159","full_name":"bbatsche/filesystem-assertions","owner":"bbatsche","description":"PHPUnit assertions for filesystem objects","archived":false,"fork":false,"pushed_at":"2023-08-10T01:52:24.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T06:21:42.418Z","etag":null,"topics":["assertions","filesystem","php","phpunit","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbatsche.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-17T02:31:27.000Z","updated_at":"2022-04-25T16:22:14.000Z","dependencies_parsed_at":"2024-11-07T18:47:01.499Z","dependency_job_id":"f3cbb83f-e5da-448b-a01b-8e0d4e5e0c45","html_url":"https://github.com/bbatsche/filesystem-assertions","commit_stats":{"total_commits":14,"total_committers":3,"mean_commits":4.666666666666667,"dds":0.1428571428571429,"last_synced_commit":"fa01bb65e2e9ac0d2450d5423b88515074965f69"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsche%2Ffilesystem-assertions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsche%2Ffilesystem-assertions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsche%2Ffilesystem-assertions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsche%2Ffilesystem-assertions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbatsche","download_url":"https://codeload.github.com/bbatsche/filesystem-assertions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239668893,"owners_count":19677629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assertions","filesystem","php","phpunit","testing"],"created_at":"2024-11-07T18:39:21.052Z","updated_at":"2025-12-08T22:30:12.857Z","avatar_url":"https://github.com/bbatsche.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- omit in toc --\u003e\n# PHPUnit Filesystem Assertions\n\nThis is a small collection PHPUnit assertions for testing filesystem entries. It is meant to compliment the assertions already built into PHPunit.\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/bebat/filesystem-assertions.svg?style=flat-square)](https://packagist.org/packages/bebat/filesystem-assertions)\n[![Required PHP Version](https://img.shields.io/packagist/php-v/bebat/filesystem-assertions.svg?style=flat-square)](https://packagist.org/packages/bebat/filesystem-assertions)\n[![License](https://img.shields.io/packagist/l/bebat/filesystem-assertions?style=flat-square)](LICENSE)\n[![Acceptance Test Status](https://img.shields.io/github/actions/workflow/status/bbatsche/filesystem-assertions/acceptance.yml?branch=main\u0026style=flat-square)](https://github.com/bbatsche/filesystem-assertions/actions/workflows/acceptance.yml)\n[![Code Coverage](https://img.shields.io/codecov/c/github/bbatsche/filesystem-assertions?style=flat-square)](https://codecov.io/gh/bbatsche/filesystem-assertions)\n\n\u003c!-- omit in toc --\u003e\n## Table of Contents\n\n- [Installation](#installation)\n- [Available Assertions](#available-assertions)\n\n## Installation\n\nUse Composer to install the current version of PHPUnit Filesystem Asserts from [Packagist](https://packagist.org/packages/bebat/phpunit-filesystem-assert).\n\n```bash\ncomposer require --dev bebat/filesystem-assertions\n```\n\nThe easiest way to add these assertions to your test case(s) is using a trait:\n\n```php\n\u003c?php\n\nuse BeBat\\FilesystemAssertions\\FilesystemAssertionsTrait;\nuse PHPUnit\\Framework\\TestCase;\n\nclass SomeTest extends TestCase\n{\n    use FilesystemAssertionsTrait;\n\n    // ...\n}\n```\n\n## Available Assertions\n\n```php\n// Assert that $directory contains one or more files.\nassertDirectoryContainsFiles(string $directory, array $files, string $message = '');\nassertDirectoryDoesNotContainFiles(string $directory, array $files, string $message = '')\n\n// Assert that $file is owned by a user ID or name.\nassertFileHasUserId(string $file, int $uid, string $message = '')\nassertFileHasUser(string $file, string $user, string $message = '')\nassertFileDoesNotHaveUserId(string $file, int $uid, string $message = '')\nassertFileDoesNotHaveUser(string $file, string $user, string $message = '')\n\n// Assert that $file has a group ID or name.\nassertFileHasGroupId(string $file, int $gid, string $message = '')\nassertFileHasGroup(string $file, string $group, string $message = '')\nassertFileDoesNotHaveGroupId(string $file, int $gid, string $message = '')\nassertFileDoesNotHaveGroup(string $file, string $group, string $message = '')\n\n// Assert that $path is a regular file.\nassertIsFile(string $path, string $message = '')\nassertIsNotFile(string $path, string $message = '')\n\n// Assert that $file is a symbolic link.\nassertFileIsLink(string $file, string $message = '')\nassertFileIsNotLink(string $file, string $message = '')\n\n// Assert that $file is executable.\nassertFileIsExecutable(string $file, string $message = '')\nassertFileIsNotExecutable(string $file, string $message = '')\n\n// Assert that $file is a symbolic link and points to $target.\nassertSymbolicLinkPointsTo(string $file, string $target, string $message = '')\nassertSymbolicLinkDoesNotPointTo(string $file, string $target, string $message = '')\n\n// Assert that $file's permissions are exactly an octal string (or integer).\nassertFilePermissionsEqual(string $file, $perms, string $message = '')\nassertFilePermissionsDoNotEqual(string $file, $perms, string $message = '')\n\n// Assert that $file's permissions MATCH an octal string (or integer).\n// For example, if a file has permissions 755, 644 would match but 422 would NOT.\nassertFilePermissionsMatch(string $file, $perms, string $message = '')\nassertFilePermissionsDoNotMatch(string $file, $perms, string $message = '')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbatsche%2Ffilesystem-assertions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbatsche%2Ffilesystem-assertions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbatsche%2Ffilesystem-assertions/lists"}