Files
kupshop/bundles/KupShop/AdminBundle/Util/AdminTestTrait.php
2025-08-02 16:30:27 +02:00

27 lines
581 B
PHP

<?php
namespace KupShop\AdminBundle\Util;
trait AdminTestTrait
{
protected function adminLogin(int $adminID)
{
$this->get(LegacyAdminCredentials::class)->setLoginSession($adminID);
}
protected function adminLogout()
{
$this->get(LegacyAdminCredentials::class)->unsetLoginSession();
}
protected function isLogged()
{
return $this->get(LegacyAdminCredentials::class)->isLogged();
}
protected function loginByHash($token)
{
return $this->get(LegacyAdminCredentials::class)->loginByHash($token);
}
}