Skip to content

Commit b8296a9

Browse files
committed
add tests
1 parent fc7f608 commit b8296a9

11 files changed

+2177
-64
lines changed

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,32 @@ of the class `MinimalCli`.
1212

1313
# Example usage
1414

15-
See [test/test.php](test/test.php) which is a program that
16-
has a single command `echo`:
15+
[src/EchoTest.php](src/EchoTest.php) is a command class
16+
containing a single command `echo` and a couple of options.
17+
18+
This command is added to a simple program in [demos/example.php](demos/example.php)
1719

1820
In order to get help on the usage of the command `echo`:
1921

20-
php test/test.php echo --help
22+
php demos/example.php echo --help
2123

2224
Put a file in uppercase:
2325

24-
php test/test.php echo --up README.md
26+
php demos/example.php echo --up README.md
2527

2628
Or (shorthand):
2729

28-
php test/test.php echo -u README.md
30+
php demos/example.php echo -u README.md
2931

3032
Which also will output the file in uppercase
3133

32-
# Helpers
34+
# Utils
3335

34-
Some common CLI helpers.
36+
Some common CLI Utils.
3537

36-
See [test/utils_test.php](test/utils_test.php)
38+
See [demos/utils_test.php](demos/utils_test.php)
3739

38-
php test/utils_test.php
40+
php demos/utils_test.php
3941

4042
Colors are supported with [https://github.com/php-parallel-lint/PHP-Console-Color](https://github.com/php-parallel-lint/PHP-Console-Color)
4143

composer.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
},
1717
"autoload": {
1818
"psr-4": {
19-
"Diversen\\": ""
19+
"Diversen\\": "src/"
2020
}
21+
},
22+
"require-dev": {
23+
"phpunit/phpunit": "^10.0"
2124
}
22-
2325
}

0 commit comments

Comments
 (0)