The problem with static methods in PHP: dependencies and mocking

Опубликовано: 12 Апрель 2019
на канале: Dave Hollingworth
4,639
68

Access the full course ➤ https://davehollingworth.net/phpunity

You'll probably come across some articles and opinions that say static methods can't be tested, and that using static methods should be avoided. The problem with static methods comes when trying to mock them. In this video we'll look at an example of why you can't stub a static method with PHPUnit.


Смотрите видео The problem with static methods in PHP: dependencies and mocking онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dave Hollingworth 12 Апрель 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,639 раз и оно понравилось 68 людям.