mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Renamed class RequestedUserRightFacade to RequestedUserRight
This commit is contained in:
parent
effb1fc6da
commit
727a5c2aaf
@ -9,7 +9,7 @@ use App\Exception\SetNotPossibleException;
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class RequestedUserRightFacade implements RequestedUserRightFacadeInterface
|
||||
class RequestedUserRight implements RequestedUserRightInterface
|
||||
{
|
||||
/**
|
||||
* @var UserSourceDirectorInterface
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\RequestManagement;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface RequestedUserRightFacadeServiceInterface extends RequestedUserRightFacadeInterface
|
||||
{
|
||||
}
|
@ -7,6 +7,6 @@ namespace App\Domain\RequestManagement;
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface RequestedUserRightFacadeInterface extends RequestedRightInterface
|
||||
interface RequestedUserRightInterface extends RequestedRightInterface
|
||||
{
|
||||
}
|
@ -7,7 +7,7 @@ use App\Domain\UserManagement\UserSourceDirectorServiceInterface;
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class RequestedUserRightFacadeService extends RequestedUserRightFacade implements RequestedUserRightFacadeServiceInterface
|
||||
final class RequestedUserRightService extends RequestedUserRight implements RequestedUserRightServiceInterface
|
||||
{
|
||||
/**
|
||||
* @param UserSourceDirectorServiceInterface $userSourceDirectorService
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\RequestManagement;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface RequestedUserRightServiceInterface extends RequestedUserRightInterface
|
||||
{
|
||||
}
|
@ -3,21 +3,21 @@
|
||||
namespace tests\Unit\Domain\RequestManagement;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Domain\RequestManagement\RequestedUserRightFacadeService;
|
||||
use App\Domain\RequestManagement\RequestedUserRightService;
|
||||
use App\Domain\UserManagement\UserSourceDirectorServiceInterface;
|
||||
use App\Domain\RequestManagement\RequestedUserRightFacadeServiceInterface;
|
||||
use App\Domain\RequestManagement\RequestedUserRightServiceInterface;
|
||||
use App\Domain\RequestManagement\RequestedRightServiceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class RequestedUserRightFacadeServiceTest extends TestCase
|
||||
class RequestedUserRightServiceTest extends TestCase
|
||||
{
|
||||
public function testConstructorSet(): void
|
||||
{
|
||||
$requestedRightService = $this->createMock(RequestedRightServiceInterface::class);
|
||||
$userSourceDirectorService = $this->createMock(UserSourceDirectorServiceInterface::class);
|
||||
$service = new RequestedUserRightFacadeService($userSourceDirectorService, $requestedRightService);
|
||||
$this->assertInstanceOf(RequestedUserRightFacadeServiceInterface::class, $service);
|
||||
$service = new RequestedUserRightService($userSourceDirectorService, $requestedRightService);
|
||||
$this->assertInstanceOf(RequestedUserRightServiceInterface::class, $service);
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ namespace tests\Unit\Domain\RightManagement;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Entity\User;
|
||||
use App\Domain\RequestManagement\RequestedUserRightFacade;
|
||||
use App\Domain\RequestManagement\RequestedUserRight;
|
||||
use App\DBAL\Types\Meta\Right\LayerType;
|
||||
use App\DBAL\Types\Meta\Right\CRUDType;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
@ -21,13 +21,13 @@ use App\Exception\SetNotPossibleException;
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class RequestedUserRightFacadeTest extends TestCase
|
||||
class RequestedUserRightTest extends TestCase
|
||||
{
|
||||
public function testInterface(): void
|
||||
{
|
||||
$userSourceDirector = $this->createMock(UserSourceDirectorInterface::class);
|
||||
$requestedRight = $this->createMock(RequestedRightInterface::class);
|
||||
$requestedUserRightFacade = new RequestedUserRightFacade($userSourceDirector, $requestedRight);
|
||||
$requestedUserRightFacade = new RequestedUserRight($userSourceDirector, $requestedRight);
|
||||
$this->assertInstanceOf(RequestedRightInterface::class, $requestedUserRightFacade);
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ class RequestedUserRightFacadeTest extends TestCase
|
||||
$requestedRight->method('getLayer')->willReturn($layer);
|
||||
$requestedRight->method('getCrud')->willReturn($type);
|
||||
$requestedRight->method('getSource')->willReturn($source);
|
||||
$requestedUserRightFacade = new RequestedUserRightFacade($userSourceDirector, $requestedRight);
|
||||
$requestedUserRightFacade = new RequestedUserRight($userSourceDirector, $requestedRight);
|
||||
$this->assertEquals($layer, $requestedUserRightFacade->getLayer());
|
||||
$this->assertEquals($type, $requestedUserRightFacade->getCrud());
|
||||
$this->assertEquals($source, $requestedUserRightFacade->getSource());
|
||||
@ -64,7 +64,7 @@ class RequestedUserRightFacadeTest extends TestCase
|
||||
$requestedRight = new RequestedRight($sourceRepository);
|
||||
$user = $this->createMock(User::class);
|
||||
$userSourceDirector = new UserSourceDirector($sourceRepository, $user);
|
||||
$requestedUserRightFacade = new RequestedUserRightFacade($userSourceDirector, $requestedRight);
|
||||
$requestedUserRightFacade = new RequestedUserRight($userSourceDirector, $requestedRight);
|
||||
$this->assertNull($requestedUserRightFacade->setLayer($layer));
|
||||
$this->assertNull($requestedUserRightFacade->setCrud($type));
|
||||
$this->assertNull($requestedUserRightFacade->setRequestedSource($requestedSource));
|
||||
@ -79,7 +79,7 @@ class RequestedUserRightFacadeTest extends TestCase
|
||||
$reciever = $this->createMock(AbstractSource::class);
|
||||
$userSourceDirector = $this->createMock(UserSourceDirectorInterface::class);
|
||||
$requestedRight = $this->createMock(RequestedRightInterface::class);
|
||||
$requestedUserRightFacade = new RequestedUserRightFacade($userSourceDirector, $requestedRight);
|
||||
$requestedUserRightFacade = new RequestedUserRight($userSourceDirector, $requestedRight);
|
||||
$this->expectException(SetNotPossibleException::class);
|
||||
$requestedUserRightFacade->setReciever($reciever);
|
||||
}
|
Loading…
Reference in New Issue
Block a user