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.
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.