-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a03c674
commit ca8db87
Showing
4 changed files
with
62 additions
and
12 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,41 @@ | ||
# PHPUnit Trainee Story in Section Unit Test | ||
|
||
Learn how to write unit tests with the php [de facto](https://en.wikipedia.org/wiki/De_facto) standard implementation [PHPUnit](https://phpunit.de/). | ||
|
||
@todo | ||
* create empty unit test file | ||
* create validator that needs to get covered by a unit test | ||
* create a unit test that needs a real implementation to test against | ||
|
||
## Tasks | ||
|
||
* read [getting started](https://phpunit.de/getting-started.html) | ||
* install phpunit | ||
* execute phpunit (php vendor/bin/phpunit) | ||
* read [documentation](https://phpunit.de/documentation.html) | ||
* implement or extend a test using @dataProvider | ||
* implement or extend a test using @depends | ||
* implement or extend a test case using [fixtures](https://phpunit.de/manual/current/en/fixtures.html) | ||
* [organize](https://phpunit.de/manual/current/en/organizing-tests.html) your tests | ||
* generate code coverage report | ||
* watch the [videos](https://phpunit.de/presentations.html) | ||
|
||
## Answer Yourself the Following Questions | ||
|
||
* why is it good to use phpunit in vendor? | ||
* what is the phpunit.xml.dist good for? | ||
* why does it has the suffix ".dist"? | ||
* for what is the "bootstrap.php" good for? | ||
* can you make phpunit more verbose? | ||
* how to test exception throwing? | ||
* can you validate the exception message also (if so, how)? | ||
* whats the difference between "assertSame" and "assertEquals"? | ||
* when to mark a test as incomplete? | ||
* when to mark a test as skipped? | ||
* when to mark a test as risky? | ||
* did you find any useful annotations? | ||
* is it easy to implement databased driven tests? | ||
* what do you have to keep in mind? | ||
* what is unit testing good for? | ||
* can you extend phpunit easily? | ||
* if you, could you find an extension you can implement? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters