I have a problem on the update treatment processed into my functional tests on Codeception : I systematically have a 404 error. Here are the details.
Everything is going well for every other simulated http requests but when codeception tries to execute the update method on a put HTTP request (POST request with a "_method" param having the value "PUT") is never executed by my controller, which lead codeception on the update url without the redirection that should happen after the treatment in this update method. I tried to redirect to my home page on top of my update method to test that fact and the redirection never happens.
For information, I use the Laravel5 module. Here is my functional.suite.yml file content :
class_name: FunctionalTester
modules:
enabled:
- Asserts
- \Helper\Functional
- MailCatcher
- Laravel5:
environment_file: .env.testing
config:
MailCatcher:
url: 'http://192.168.10.10'
port: '1080'
I tried to replace the "PUT" value of the "_method" param by "PATCH" to see if any change could be seen but the problem persists and the behaviour is still the same.
Codeception includes the Laravel5 app to test it. The only clue I have is that the testing environment has a problem to interpret the PUT or PATCH request. There is no problem for a simple POST request (creation doesn't cause any problem).
I precise that the HTML form is correct, the update happens correctly in my local environment and the http request contains correct params. Here is what I have when I execute it the with the --debug option :
[Uri] http://project/en/permissions/update
[Method] POST
[Parameters] {"_token":"RUx7DjU3b6GEjodnpwXvJJYJIcmQJGbabj23q0yK","_method":"PATCH","_id":"1","name_en":"Administrator","name_fr":"Administrateur","slug":"admin"}
[Page] http://project/en/permissions/update
[Response] 200
[Request Cookies] {"XSRF-TOKEN":"eyJpdiI6InZQV2NVcTRoZHVONXYzZzNLTnBWU1E9PSIsInZhbHVlIjoiWWhWa0kyUGxJNkJRTXIyaEhVcDdHR0tRcklHZStpVWdlTjlDdmRKVmEyVDFPWkxBVmhLc1lra05zeWh1ZWtKMENCc29lWFZTN2lSd3dIbjZyNEo5eWc9PSIsIm1hYyI6ImEzMDNmOWM5OGQzNzE4ZWI5MDg0MTI0ZmQwMTI1ZTk0OTM1OTY4NjA5ZTZjMGFhYTI0MTdlMzMzM2QyMWQ4MzUifQ==","laravel_session":"eyJpdiI6ImF4cVFYYVNUU3J0WUd2VzNRZlhSc3c9PSIsInZhbHVlIjoibDdPd3ZEZVZOdDJwRlBjMVZtc2dNM0I3WUw0REEzK25NVFVWT1FIRjEzR05tRGZLXC9SYUZkRmhEdXlyQVdybURHTWVQVUtucnBkZEwwaTN4NWF6XC9YQT09IiwibWFjIjoiMzliODY4ZWUwYmZjODI1OTVkMTBiYjA4ODY2OWNiODc3ZTI1NzAzZmJhMjg4OTY4Y2MzM2VkMjYyYTkwOTQ2MyJ9"}
[Response Headers] {"cache-control":["no-cache"],"Set-Cookie":[{},{}]}
As you can see, the process end on a 200 response and that is all.. I tested it with a few pages and the problem is the same everywhere.
I'm blocked on this problem for weeks now without finding any solution. If someone has a clue, I am listening !.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1SeiR5Q
via IFTTT
Aucun commentaire:
Enregistrer un commentaire