/** * @return null * @throws \Exception */ public function initToken() { $token = $this->getToken(); if ($token === null) { $cookie = new Cookies($this->client); if ($cookie->loadToken() !== null) { $token = $cookie->loadToken(); } else { $token = $this->generateToken(); } } $this->setToken($token); }
public function testLoadToken() { $this->assertNull($this->cookie->loadToken()); }