3

I have configured my custom router/controller/frontname to be forced to use SSL using the "secure_url" node in my config.xml. Does anyone know how I can write a test using EcomDev PHPUnit to confirm this is working?

In addition is there a way to test for duplicate xml nodes in my config files?

This all came about because I inadvertently duplicated a node name which caused my route not to be forced to use SSL. Below is an example:

<secure_url><module_one>frontname</module_one></secure_url>
<secure_url><module_one>frontname_two</module_one></secure_url>

The second node overrides the first since module_one is duplicated as the node name. The result is that frontname is not forced to use SSL.The above xml was in two different modules.

1 Answer 1

3

In your test case you can test the value of the Request object.

Mage::app()->getFrontController()->getRequest()->isSecure();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.