Unit test a function with PHPUnit

preview_player
Показать описание

In this video you'll learn how to test a PHP function defined in a different file, and also how to use multiple assertions in a single PHPUnit test method.
Рекомендации по теме
Комментарии
Автор

1:29 maybe I'm being dumb but I don't understand why this require works. The function file is one directory up. I'd expect your require statement to look for the file in the tests folder.

ryanford
Автор

Sir how can i display all data from db according to user timezone dynamically in laravel i have set utc timezone in my app config file

amitsolanki
Автор

I am getting this error message: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in on line 277

robinjoseph
Автор

Could you do that with already defined variables' for example to do this test with a form function that adds data to the database?

thomaswahahauw