Для своей работы я использую расширение контекста behatch , чтобы проверить мой API.
С массовым обновлением моей библиотеки я столкнулся со странным поведением. Представьте, что я отправляю два запроса (например, POST и GET), а затем теряю файлы cookie между ними.
Я выбросил баночку с печеньем в этом примере:
When I send a "POST" request to "/rest/contacts" with body: # Behatch\Context\RestContext::iSendARequestToWithBody()
"""
{
"name": "toto",
"mail": "titi@toto.com"
}
"""
│ vendor/fabpot/goutte/Goutte/Client.php:128:
│ class Symfony\Component\BrowserKit\CookieJar#4009 (1) {
│ protected $cookieJar =>
│ array(1) {
│ 'localhost' =>
│ array(1) {
│ '/' =>
│ array(2) {
│ ...
│ }
│ }
│ }
│ }
│
Then the response status code should be 201 # Behat\MinkExtension\Context\MinkContext::assertResponseStatus()
When I send a "GET" request to "/rest/contacts/3" # Behatch\Context\RestContext::iSendARequestTo()
│ fabpot/goutte/Goutte/Client.php:128:
│ class Symfony\Component\BrowserKit\CookieJar#4009 (1) {
│ protected $cookieJar =>
│ array(0) {
│ }
│ }
Мне что-то здесь не хватает? Любая помощь приветствуется. Для вашей записи я проверил срок действия куки, но он не просрочен.