Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (28 sloc) 0.743 kb
<?php
/**
* Lithium: the most rad php framework
*
* @copyright Copyright 2009, Union of RAD (http://union-of-rad.org)
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
namespace lithium\tests\mocks\security\auth\adapter;
class MockAuthAdapter extends \lithium\core\Object {
public function check($credentials, array $options = array()) {
switch (true) {
case isset($options['success']):
return $credentials;
case isset($options['keyOnly']):
return $credentials['id'];
}
return false;
}
public function set($data, array $options = array()) {
if (isset($options['fail'])) {
return false;
}
return $data;
}
public function clear(array $options = array()) {
}
}
?>
Jump to Line
Something went wrong with that request. Please try again.