Removed deprecated class

This commit is contained in:
Kevin Frantz 2019-03-29 23:35:03 +01:00
parent db2e4dac01
commit 0115751e98
4 changed files with 12 additions and 51 deletions

View File

@ -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',
];
}

View File

@ -58,9 +58,9 @@ class UserMenuSubscriber extends AbstractEntityMenuSubscriber implements EventSu
$menu->addChild($this->trans($slug), [
'route' => self::LAYER_GET_ROUTE,
'routeParameters' => [
'identity' => $slug,
'_format' => RESTResponseType::HTML,
'layer' => LayerType::SOURCE,
LayerController::IDENTITY_PARAMETER_KEY => $slug,
LayerController::FORMAT_PARAMETER_KEY => RESTResponseType::HTML,
LayerController::LAYER_PARAMETER_KEY => LayerType::SOURCE,
],
'attributes' => [
'icon' => $icon,

View File

@ -12,22 +12,24 @@ use Infinito\Domain\UserManagement\UserSourceDirectorInterface;
use Infinito\Domain\RequestManagement\Right\RequestedRightInterface;
use Infinito\Domain\RequestManagement\Right\RequestedRight;
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
use Infinito\DBAL\Types\SystemSlugType;
use Infinito\Exception\SetNotPossibleException;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Domain\RequestManagement\Right\AbstractRequestedRightFacade;
use Infinito\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
/**
* @author kevinfrantz
*/
class AbstractRequestedRightFacadeTest extends TestCase
{
/**
* @param RequestedRightInterface $requestedRight
*
* @return AbstractRequestedRightFacade
*/
private function getRequestedRightFacade(RequestedRightInterface $requestedRight): 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;
$reciever = $this->createMock(SourceInterface::class);
$requestedEntity = $this->createMock(RequestedEntityInterface::class);
$requestedEntity->method('getSlug')->willReturn(SystemSlugType::IMPRINT);
$requestedEntity->method('getSlug')->willReturn(ImpressumFixtureSource::getSlug());
$requestedEntity->method('hasSlug')->willReturn(true);
$requestedRight = new RequestedRight();
$requestedRightFacade = $this->getRequestedRightFacade($requestedRight);

View File

@ -14,9 +14,9 @@ use Infinito\Domain\RequestManagement\Right\RequestedRight;
use Infinito\Domain\UserManagement\UserSourceDirector;
use Infinito\Repository\Source\SourceRepositoryInterface;
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
use Infinito\DBAL\Types\SystemSlugType;
use Infinito\Exception\SetNotPossibleException;
use Infinito\Exception\NotCorrectInstanceException;
use Infinito\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
/**
* @author kevinfrantz
@ -58,7 +58,7 @@ class RequestedUserTest extends TestCase
$layer = LayerType::SOURCE;
$type = CRUDType::READ;
$requestedSource = $this->createMock(RequestedEntityInterface::class);
$requestedSource->method('getSlug')->willReturn(SystemSlugType::IMPRINT);
$requestedSource->method('getSlug')->willReturn(ImpressumFixtureSource::getSlug());
$requestedSource->method('hasSlug')->willReturn(true);
$sourceRepository = $this->createMock(SourceRepositoryInterface::class);
$requestedRight = new RequestedRight();