Skip to content

Commit d6c6016

Browse files
author
Greg Bowler
committed
docs: outline functionality in readme
1 parent 4735ef3 commit d6c6016

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ The file at `.github/workflows/ci.yml` shows how to use [php-actions/phpunit][ac
1111

1212
Versions of PHPUnit and all options are available to configure. Please see the [php-actions/phpunit documentation][action-link] for more information!
1313

14+
Functionality
15+
-------------
16+
17+
There are two classes in this example project; `Greeter` and `EnvGreeter`, in the `src/` directory, which are tested in the `test/` directory.
18+
19+
The `Greeter` has a function, `greet()` which takes an optional name. Without providing a name, the Greeter will return "Hello!", otherwise it will include the provided name, like "Hello, Example!".
20+
21+
The `EnvGreeter` extends `Greeter` and provides a new function, `greetFromEnv()`, which takes the name of an environment variable to load the name from.
22+
23+
The GitHub Action tests are executed in the [`ci.yml` file](https://github.com/php-actions/example-phpunit/blob/e1db6474eec4dc75526042f9cf5dab2bf8f163f9/.github/workflows/ci.yml#L14-L21) where the TEST_NAME environment variable is declared, along with any other PHPUnit configuration.
24+
25+
Click the [Actions tab](https://github.com/php-actions/example-phpunit/actions) at the top of this repository to view the latest test runs.
26+
1427
***
1528

1629
If you found this repository helpful, please consider [sponsoring the developer][sponsor].

0 commit comments

Comments
 (0)