Ejemplo n.º 1
0
 public function testTokenExistsForEmail()
 {
     $email = '*****@*****.**';
     $file_name = getenv('HOME') . "/.terminus/tokens/{$email}";
     exec("rm {$file_name}");
     $this->assertFalse($this->tokens_cache->tokenExistsForEmail($email));
     $this->tokens_cache->add(compact('email'));
     $this->assertTrue($this->tokens_cache->tokenExistsForEmail($email));
     exec("rm {$file_name}");
 }
Ejemplo n.º 2
0
Archivo: Auth.php Proyecto: dalin-/cli
 /**
  * Checks to see whether the email has been set with a machine token
  *
  * @param string $email Email address to check for
  * @return bool
  */
 public function tokenExistsForEmail($email)
 {
     $file_exists = $this->tokens_cache->tokenExistsForEmail($email);
     return $file_exists;
 }