Markdown

[PHPUnit] mock

mock
===

Mock Objects
https://phpunit.de/manual/current/en/test-doubles.html#test-doubles.mock-objects

對異常進行測試
https://jaceju-books.gitbooks.io/phpunit-in-action/content/chapters/03/5.html

Testing Exceptions
https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html

How to unit testing Exceptions with PHPUnit?
https://stackoverflow.com/questions/4646822/how-to-unit-testing-exceptions-with-phpunit
this->fail() ??


https://stackoverflow.com/questions/28760534/phpunit-to-test-catch-block

https://stackoverflow.com/questions/5683592/phpunit-assert-that-an-exception-was-thrown


如何使用 PHPUnit mock Closure?
http://oomusou.io/phpunit/phpunit-closure-mock/

https://php-and-symfony.matthiasnoback.nl/2012/06/symfony2-testing-your-controllers/

留言