mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 11:17:58 +00:00 
			
		
		
		
	Declared setActionType as immutable for RequestedRight
This commit is contained in:
		@@ -16,6 +16,8 @@ use Infinito\Domain\RepositoryManagement\LayerRepositoryFactoryService;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
use Infinito\Entity\Meta\Law;
 | 
			
		||||
use Infinito\Entity\Source\SourceInterface;
 | 
			
		||||
use Infinito\DBAL\Types\ActionType;
 | 
			
		||||
use Infinito\Exception\AllreadySetException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author kevinfrantz
 | 
			
		||||
@@ -105,4 +107,13 @@ class RequestedRightTest extends KernelTestCase
 | 
			
		||||
        $responseSource1 = $this->requestedRight->getSource();
 | 
			
		||||
        $this->assertEquals($responseSource1, $source);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testSetActionType(): void
 | 
			
		||||
    {
 | 
			
		||||
        $attributType = ActionType::CREATE;
 | 
			
		||||
        $this->requestedRight->setActionType($attributType);
 | 
			
		||||
        $this->assertEquals($attributType, $this->requestedRight->getActionType());
 | 
			
		||||
        $this->expectException(AllreadySetException::class);
 | 
			
		||||
        $this->requestedRight->setActionType($attributType);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user