K
K
knowledge2018-10-12 15:13:58
Yii
knowledge, 2018-10-12 15:13:58

How to get url in unit tests in PHP?

I use the yii2 framework, I test with codeception I
test the behaviors attached to the action (behavior)
with a certain behavior, I write data to the database, including the url that I get via Url::currect
when used, everything is fine, asseptants also pass, but in unit tests fail because the Application is not running, there is no environment and it is impossible to get the url. The
problem is that I am testing behaviors, that is, by performing certain actions, those that need to be tested are called. I can't figure out how to change the url in unit tests

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question