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}"); }
/** * 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; }