Elgg\PersistentLoginTest::testRemoveDeletesHashAndDeletesTokenFromCookieAndSession PHP Method

testRemoveDeletesHashAndDeletesTokenFromCookieAndSession() public method

    function testRemoveDeletesHashAndDeletesTokenFromCookieAndSession()
    {
        $this->svc = $this->getSvcWithCookie($this->mockToken);
        $this->dbMock->expects($this->once())->method('deleteData')->will($this->returnCallback(array($this, 'mock_deleteData')));
        $this->svc->removePersistentLogin();
        $this->assertSame('', $this->lastCookieSet->value);
        $this->assertSame($this->thirtyDaysAgo, $this->lastCookieSet->expire);
        $this->assertNull($this->session->get('code'));
    }