Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automated test suite #31

Merged
merged 30 commits into from
Jun 8, 2020
Merged

Add automated test suite #31

merged 30 commits into from
Jun 8, 2020

Conversation

stevegrunwell
Copy link
Owner

This PR adds an automated test suite, using PHPUnit.

Why PHPUnit? It's readily available, easy to install, and is something I'm comfortable with. The PR aims to add all of the heavy lifting (mocking tmutil and dealing with PHP file descriptors), so adding additional tests will be fairly straight-forward as the project grows.

While PHPUnit isn't the perfect tool for testing shell scripts, it does give us the necessary tools to create a temporary filesystem with a pre-determined structure, as well as the ability to overwrite environment variables to scope Asimov to our dummy directory.

In this particular case, we're overloading the tmutil application with a PHP test double, enabling us to track what's called without actually relying on tmutil.
…the same test method, then make sure that Asimov is checking to see if a path has been excluded before excluding it
@stevegrunwell stevegrunwell changed the title WIP: Add automated test suite Add automated test suite Jun 8, 2020
@stevegrunwell stevegrunwell merged commit debb1e9 into develop Jun 8, 2020
@stevegrunwell stevegrunwell deleted the feature/phpunit branch June 8, 2020 02:23
@stevegrunwell stevegrunwell mentioned this pull request Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant