2021-11-28 12:11:12 +00:00
|
|
|
<?php
|
2024-08-24 12:31:41 +00:00
|
|
|
|
|
|
|
// Copyright (C) 2010-2024, the Friendica project
|
|
|
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-11-28 12:11:12 +00:00
|
|
|
|
|
|
|
namespace Friendica\Test\Util;
|
|
|
|
|
|
|
|
use Friendica\App;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Making the App class overridable for specific situations
|
|
|
|
*
|
|
|
|
* @see App
|
|
|
|
*/
|
|
|
|
class AppDouble extends App
|
|
|
|
{
|
|
|
|
/** @var bool Marks/Overwrites if the user is currently logged in */
|
|
|
|
protected $isLoggedIn = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Manually overwrite the "isLoggedIn" behavior
|
|
|
|
*
|
|
|
|
* @param bool $isLoggedIn
|
|
|
|
*/
|
|
|
|
public function setIsLoggedIn(bool $isLoggedIn)
|
|
|
|
{
|
|
|
|
$this->isLoggedIn = $isLoggedIn;
|
|
|
|
}
|
|
|
|
|
2022-06-17 16:00:06 +00:00
|
|
|
public function isLoggedIn(): bool
|
2021-11-28 12:11:12 +00:00
|
|
|
{
|
|
|
|
return $this->isLoggedIn;
|
|
|
|
}
|
|
|
|
}
|