You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2023. It is now read-only.
If baseurl is using HTTPS simple controller tests doing a dispatch exit with 0.
E.g.: $this->dispatch('');
There is a 302 redirect and an exit, due to Mage_Core_Controller_Varien_Router_Standard::_checkShouldBeSecure(...).
and $request->isSecure() is false because $_SERVER['HTTPS'] is not defined.
core config is: web/unsecure/base_url https://xyz.dev/
I can work around the issue by manually setting $_SERVER['HTTPS'] in the test.
class XYZ_Subaccounts_Test_Controller_SimpleTest extends EcomDev_PHPUnit_Test_Case_Controller {
/**
* @test
* @group simpletest
*/
public function cmsindexTest() {
// Workarround if unsecure baseurl is also httpS
$_SERVER['HTTPS'] = 'on';
$this->dispatch('');
$this->assertRequestRoute('cms/index/index');
}
}
Don't know if there is a misconfiguration. I used dev branch. It is on OS X. PHP 5.6,5.5, PHPUnit 4.8.26.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If baseurl is using HTTPS simple controller tests doing a dispatch exit with 0.
E.g.:
$this->dispatch('');
There is a 302 redirect and an exit, due to
Mage_Core_Controller_Varien_Router_Standard::_checkShouldBeSecure(...)
.and
$request->isSecure()
is false because$_SERVER['HTTPS']
is not defined.local.xml.phpunit looks like:
core config is:
web/unsecure/base_url https://xyz.dev/
I can work around the issue by manually setting
$_SERVER['HTTPS']
in the test.class XYZ_Subaccounts_Test_Controller_SimpleTest extends EcomDev_PHPUnit_Test_Case_Controller {
}
Don't know if there is a misconfiguration. I used dev branch. It is on OS X. PHP 5.6,5.5, PHPUnit 4.8.26.
The text was updated successfully, but these errors were encountered: