P
P
ProgramSM2018-01-24 10:28:36
Software testing
ProgramSM, 2018-01-24 10:28:36

codeception. How to check the full domain of a cookie?

The task is to check the domain (including the 3rd level domain) in a functional test when starting a session with a cookie
. In codeception, FunctionalTester has two methods:
seeCookie($name, [$domain, $path]);
grabCookie($name, [$domain, $path]);
The problem is that codeception (or rather \Codeception\Lib\InnerBrowser::seeCookie()) does not see the difference in domains between 'examle.net', 'www.exmaple.net' or even 'beliberda.example.net', comparing only the second and first level domains.
grabCookie() generally returns only the value of the cookie, without any other parameters.
How can I change this codeception behavior specifically for one test, or how can I get the cookie value without writing bicycles?

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