function getAuth($db) { $gw = new T_User_Gateway($db, new T_Factory_Di()); $user = new T_User(null, uniqid() . '@example.com'); $gw->save($user); return new T_Auth(T_Auth::CHALLENGED, $user); }
function insertUser(T_User_Gateway $gateway) { $gateway->save($user = $this->createUser()); return $user; }