mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-04-16 10:16:22 +02:00
Removed deprecated class
This commit is contained in:
parent
db2e4dac01
commit
0115751e98
@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Infinito\DBAL\Types;
|
|
||||||
|
|
||||||
use Fresh\DoctrineEnumBundle\DBAL\Types\AbstractEnumType;
|
|
||||||
use Infinito\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
|
|
||||||
use Infinito\Domain\FixtureManagement\FixtureSource\GuestUserFixtureSource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Containes the system slugs.
|
|
||||||
*
|
|
||||||
* @author kevinfrantz
|
|
||||||
*
|
|
||||||
* @todo Organize this somehow on an other way
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
final class SystemSlugType extends AbstractEnumType
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see ImpressumFixtureSource
|
|
||||||
*/
|
|
||||||
public const IMPRINT = 'IMPRINT';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see GuestUserFixtureSource
|
|
||||||
*/
|
|
||||||
public const GUEST_USER = 'GUEST_USER';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected static $choices = [
|
|
||||||
self::IMPRINT => 'imprint',
|
|
||||||
self::GUEST_USER => 'guest user',
|
|
||||||
];
|
|
||||||
}
|
|
@ -58,9 +58,9 @@ class UserMenuSubscriber extends AbstractEntityMenuSubscriber implements EventSu
|
|||||||
$menu->addChild($this->trans($slug), [
|
$menu->addChild($this->trans($slug), [
|
||||||
'route' => self::LAYER_GET_ROUTE,
|
'route' => self::LAYER_GET_ROUTE,
|
||||||
'routeParameters' => [
|
'routeParameters' => [
|
||||||
'identity' => $slug,
|
LayerController::IDENTITY_PARAMETER_KEY => $slug,
|
||||||
'_format' => RESTResponseType::HTML,
|
LayerController::FORMAT_PARAMETER_KEY => RESTResponseType::HTML,
|
||||||
'layer' => LayerType::SOURCE,
|
LayerController::LAYER_PARAMETER_KEY => LayerType::SOURCE,
|
||||||
],
|
],
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'icon' => $icon,
|
'icon' => $icon,
|
||||||
|
@ -12,22 +12,24 @@ use Infinito\Domain\UserManagement\UserSourceDirectorInterface;
|
|||||||
use Infinito\Domain\RequestManagement\Right\RequestedRightInterface;
|
use Infinito\Domain\RequestManagement\Right\RequestedRightInterface;
|
||||||
use Infinito\Domain\RequestManagement\Right\RequestedRight;
|
use Infinito\Domain\RequestManagement\Right\RequestedRight;
|
||||||
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
|
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
|
||||||
use Infinito\DBAL\Types\SystemSlugType;
|
|
||||||
use Infinito\Exception\SetNotPossibleException;
|
use Infinito\Exception\SetNotPossibleException;
|
||||||
use Infinito\Entity\Source\SourceInterface;
|
use Infinito\Entity\Source\SourceInterface;
|
||||||
use Infinito\Domain\RequestManagement\Right\AbstractRequestedRightFacade;
|
use Infinito\Domain\RequestManagement\Right\AbstractRequestedRightFacade;
|
||||||
|
use Infinito\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
*/
|
*/
|
||||||
class AbstractRequestedRightFacadeTest extends TestCase
|
class AbstractRequestedRightFacadeTest extends TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param RequestedRightInterface $requestedRight
|
||||||
|
*
|
||||||
|
* @return AbstractRequestedRightFacade
|
||||||
|
*/
|
||||||
private function getRequestedRightFacade(RequestedRightInterface $requestedRight): AbstractRequestedRightFacade
|
private function getRequestedRightFacade(RequestedRightInterface $requestedRight): AbstractRequestedRightFacade
|
||||||
{
|
{
|
||||||
return new class($requestedRight) extends AbstractRequestedRightFacade {
|
return new class($requestedRight) extends AbstractRequestedRightFacade {
|
||||||
// public function __construct(RequestedRightInterface $requestedRight){
|
|
||||||
// $this->requestedRight = $requestedRight;
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ class AbstractRequestedRightFacadeTest extends TestCase
|
|||||||
$type = CRUDType::READ;
|
$type = CRUDType::READ;
|
||||||
$reciever = $this->createMock(SourceInterface::class);
|
$reciever = $this->createMock(SourceInterface::class);
|
||||||
$requestedEntity = $this->createMock(RequestedEntityInterface::class);
|
$requestedEntity = $this->createMock(RequestedEntityInterface::class);
|
||||||
$requestedEntity->method('getSlug')->willReturn(SystemSlugType::IMPRINT);
|
$requestedEntity->method('getSlug')->willReturn(ImpressumFixtureSource::getSlug());
|
||||||
$requestedEntity->method('hasSlug')->willReturn(true);
|
$requestedEntity->method('hasSlug')->willReturn(true);
|
||||||
$requestedRight = new RequestedRight();
|
$requestedRight = new RequestedRight();
|
||||||
$requestedRightFacade = $this->getRequestedRightFacade($requestedRight);
|
$requestedRightFacade = $this->getRequestedRightFacade($requestedRight);
|
||||||
|
@ -14,9 +14,9 @@ use Infinito\Domain\RequestManagement\Right\RequestedRight;
|
|||||||
use Infinito\Domain\UserManagement\UserSourceDirector;
|
use Infinito\Domain\UserManagement\UserSourceDirector;
|
||||||
use Infinito\Repository\Source\SourceRepositoryInterface;
|
use Infinito\Repository\Source\SourceRepositoryInterface;
|
||||||
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
|
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
|
||||||
use Infinito\DBAL\Types\SystemSlugType;
|
|
||||||
use Infinito\Exception\SetNotPossibleException;
|
use Infinito\Exception\SetNotPossibleException;
|
||||||
use Infinito\Exception\NotCorrectInstanceException;
|
use Infinito\Exception\NotCorrectInstanceException;
|
||||||
|
use Infinito\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
@ -58,7 +58,7 @@ class RequestedUserTest extends TestCase
|
|||||||
$layer = LayerType::SOURCE;
|
$layer = LayerType::SOURCE;
|
||||||
$type = CRUDType::READ;
|
$type = CRUDType::READ;
|
||||||
$requestedSource = $this->createMock(RequestedEntityInterface::class);
|
$requestedSource = $this->createMock(RequestedEntityInterface::class);
|
||||||
$requestedSource->method('getSlug')->willReturn(SystemSlugType::IMPRINT);
|
$requestedSource->method('getSlug')->willReturn(ImpressumFixtureSource::getSlug());
|
||||||
$requestedSource->method('hasSlug')->willReturn(true);
|
$requestedSource->method('hasSlug')->willReturn(true);
|
||||||
$sourceRepository = $this->createMock(SourceRepositoryInterface::class);
|
$sourceRepository = $this->createMock(SourceRepositoryInterface::class);
|
||||||
$requestedRight = new RequestedRight();
|
$requestedRight = new RequestedRight();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user