I've created simple Magento 2 module that switches Magento whole website to https doing it via plugin for class
That always returns true for method
Method works, all urls are being generated as secure, and all pages are automatically redirected via 302 header to secure versions.
However, running integration tests I noticed that integration test
now returns failure due to expecting http version for unsecure pages.
Is there a way of modifying behaviour of core integrations tests without actually modifying core files?
Is there a better way ensuring Magento 2 whole site is set as secure and not breaking tests?
@Kamil Szewczyk, just curious, isn't it easier to switch to all https by specifying https for unsecure urls in configuration?
@sivashchenko - that what we were always doing in M1, however we were advised that this is not the correct approach to switching whole site as secure, as the modules might behave unexpectedly when using https as base url for unsecure content.
Plugin method was the quickest way of ensuring that all calls will be done as secure url