Skip to content

Instantly share code, notes, and snippets.

@ondrejmirtes
Created April 14, 2010 15:59
Show Gist options
  • Save ondrejmirtes/365986 to your computer and use it in GitHub Desktop.
Save ondrejmirtes/365986 to your computer and use it in GitHub Desktop.
<?php
class HomepagePresenterTest extends TestCase
{
public function testLogout()
{
$presenter = new HomepagePresenter;
$this->login();
$this->assertTrue(Environment::getUser()->isLoggedIn());
$response = $presenter->run(new PresenterRequest('Admin:Homepage', 'GET', array(
'lang' => 'cs',
'do' => 'logout', // signal
)));
$this->assertType(self::REDIRECTING_RESPONSE, $response);
$this->assertFalse(Environment::getUser()->isLoggedIn());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment