Automattic / team51-cli

A tool for provisioning and connecting GitHub repos, Pressable WordPress sites and DeployHQ.
MIT License
12 stars 0 forks source link

Add PHPUnit testing framework #181

Open nickpagz opened 1 year ago

nickpagz commented 1 year ago

Purpose of this PR:

Implement the PHPUnit testing framework on the Team 51 CLI tool to support development.

Approach

This implementation focuses on unit testing. While Symfony includes command level testing, a finer grain approach would produce more valuable outcomes for developers modifying existing and/or creating new commands.

Symfony includes a built-in implementation and integration with PHPUnit to scaffold in the required libraries which was used for this PR.

The intent is to keep testing optional, and as such the tests won't be part of any commit or merge level checks. The tests can be run manually as required.

Changes proposed in this Pull Request:

How to Test:

Adding new tests: