Skip to content

Add automated test suite#31

Merged
stevegrunwell merged 30 commits intodevelopfrom
feature/phpunit
Jun 8, 2020
Merged

Add automated test suite#31
stevegrunwell merged 30 commits intodevelopfrom
feature/phpunit

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