Im working on a login with user accounts as a subdomain, a la basecamp
account-name.domain.com - Shows the account login screen for that account
A route is setup to detect the subdomain and creates the account parameter
as such; and redirects to the session controller
$hostnameRoute = new Zend_Controller_Router_Route_Hostname(
':account.domain.local',
array(
'controller' => 'session',
'action' => 'index'
)
);
Problem is my testing, at the moment if the user logs in successfully they
are redirected to the account controller.
Here is how my test case is set
public function testUserCanLogin()
{
$this->request->setParam('account', 'algiz');
$this->request->setPost(array(
'username' => 'username',
'password' => 'changeme'
));
$this->dispatch("/session");
$this->assertRedirectTo("/account");
}
Thing is via the browser this works, however the test case always fails.
Any help is much appreciated
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Logging-in-unit-test-with-route-Hostname-tp2219474p2219474.html
Sent from the Zend Framework mailing list archive at Nabble.com.