mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2024-12-04 23:17:19 +01:00
Implemented getUserSourceDirector
This commit is contained in:
parent
0af438479f
commit
0ab4cee064
@ -49,4 +49,14 @@ class RequestedUser extends AbstractRequestedRightFacade implements RequestedUse
|
||||
{
|
||||
return $this->userSourceDirector->getUser()->getSource();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \App\Domain\RequestManagement\User\RequestedUserInterface::getUserSourceDirector()
|
||||
*/
|
||||
public function getUserSourceDirector(): UserSourceDirectorInterface
|
||||
{
|
||||
return $this->userSourceDirector;
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Domain\RequestManagement\User;
|
||||
|
||||
use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
||||
use App\Domain\UserManagement\UserSourceDirectorInterface;
|
||||
|
||||
/**
|
||||
* Offers a Service for managing the rights.
|
||||
@ -11,4 +12,8 @@ use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
||||
*/
|
||||
interface RequestedUserInterface extends RequestedRightInterface
|
||||
{
|
||||
/**
|
||||
* @return UserSourceDirectorInterface
|
||||
*/
|
||||
public function getUserSourceDirector(): UserSourceDirectorInterface;
|
||||
}
|
||||
|
@ -83,4 +83,12 @@ class RequestedUserTest extends TestCase
|
||||
$this->expectException(SetNotPossibleException::class);
|
||||
$requestedUserRightFacade->setReciever($reciever);
|
||||
}
|
||||
|
||||
public function testGetUserDirector(): void
|
||||
{
|
||||
$userSourceDirector = $this->createMock(UserSourceDirectorInterface::class);
|
||||
$requestedRight = $this->createMock(RequestedRightInterface::class);
|
||||
$requestedUserRightFacade = new RequestedUser($userSourceDirector, $requestedRight);
|
||||
$this->assertEquals($userSourceDirector, $requestedUserRightFacade->getUserSourceDirector());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user