Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created November 4, 2012 14:04
Show Gist options
  • Save eminetto/4012057 to your computer and use it in GitHub Desktop.
Save eminetto/4012057 to your computer and use it in GitHub Desktop.
/**
* Teste da autorização
* @return void
*/
public function testAuthorize()
{
$authService = $this->getService('Admin\Service\Auth');
$result = $authService->authorize();
$this->assertFalse($result);
$user = $this->addUser();
$result = $authService->authenticate(
array('username' => $user->username, 'password' => 'apple')
);
$this->assertTrue($result);
$result = $authService->authorize();
$this->assertTrue($result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment