2019-01-13 13:14:29 +01:00
|
|
|
<?php
|
2019-01-13 14:00:16 +01:00
|
|
|
|
2019-01-13 13:14:29 +01:00
|
|
|
namespace tests\Unit\Domain\RightManagement;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use App\Entity\User;
|
|
|
|
use App\Entity\Source\SourceInterface;
|
|
|
|
use App\Domain\RightManagement\UserRightService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
|
|
|
class UserRightServiceTest extends TestCase
|
|
|
|
{
|
2019-01-13 14:00:16 +01:00
|
|
|
public function testUserSet(): void
|
|
|
|
{
|
2019-01-13 13:14:29 +01:00
|
|
|
$user = new User();
|
|
|
|
$source = $this->createMock(SourceInterface::class);
|
|
|
|
$user->setSource($source);
|
|
|
|
$userRight = new UserRightService($user);
|
|
|
|
$this->assertEquals($source, $userRight->getReciever());
|
|
|
|
}
|
|
|
|
}
|