PHP Unit Tests in Visual Studio
Requirements
PHPUnit
- bundled with php tools, no prerequisites
- optionally install specific phpunit from composer
Folder Structure
phpunit.xml
Writing Tests
Test Methods
- naming conventions, visibility
- phpdoc tags
- groups
Assertions, Exceptions, Errors
Output
Bootstrap & Autoload
Test Explorer
Listing Tests
- grouping by: groups, namespace, class, name, outcome, ...
Running Tests
Tests Outcome
Debugging Tests
Conclusion
References