Elgg\PersistentLoginTest::getSvcWithCookie PHP Method

getSvcWithCookie() protected method

protected getSvcWithCookie ( string $cookie_token = '' ) : PersistentLoginService
$cookie_token string
return PersistentLoginService
    protected function getSvcWithCookie($cookie_token = '')
    {
        $cookie_config = array('lifetime' => 0, 'path' => '/', 'domain' => '', 'secure' => false, 'httponly' => false, 'name' => 'elggperm', 'expire' => time() + 30 * 86400);
        $time = $this->thirtyDaysAgo + 30 * 86400;
        $svc = new \Elgg\PersistentLoginService($this->dbMock, $this->session, $this->cryptoMock, $cookie_config, $cookie_token, $time);
        $svc->_callable_get_user = array($this, 'mock_get_user');
        $svc->_callable_generateToken = array($this, 'mock_generateToken');
        $svc->_callable_elgg_set_cookie = array($this, 'mock_elgg_set_cookie');
        $svc->_callable_sleep = array($this, 'mock_sleep');
        return $svc;
    }