mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Updated type references
This commit is contained in:
		| @@ -6,10 +6,10 @@ use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\Meta\RightInterface; | ||||
| use App\Entity\Meta\Right; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\DBAL\Types\LayerType; | ||||
| use App\DBAL\Types\Meta\Right\LayerType; | ||||
| use App\Domain\RightManagement\RightCheckerInterface; | ||||
| use App\Domain\RightManagement\RightChecker; | ||||
| use App\DBAL\Types\RightType; | ||||
| use App\DBAL\Types\Meta\Right\CRUDType; | ||||
| use App\Entity\Source\PureSource; | ||||
|  | ||||
| class RightCheckerTest extends TestCase | ||||
| @@ -42,7 +42,7 @@ class RightCheckerTest extends TestCase | ||||
|     public function setUp(): void | ||||
|     { | ||||
|         $this->layer = LayerType::RELATION; | ||||
|         $this->type = RightType::READ; | ||||
|         $this->type = CRUDType::READ; | ||||
|         $this->source = new PureSource(); | ||||
|         $this->right = new Right(); | ||||
|         $this->right->setReciever($this->source); | ||||
| @@ -57,7 +57,7 @@ class RightCheckerTest extends TestCase | ||||
|         $this->assertTrue($granted); | ||||
|         $notGranted = $this->rightManager->isGranted(LayerType::SOURCE, $this->type, $this->source); | ||||
|         $this->assertFalse($notGranted); | ||||
|         $notGranted2 = $this->rightManager->isGranted($this->layer, RightType::WRITE, $this->source); | ||||
|         $notGranted2 = $this->rightManager->isGranted($this->layer, CRUDType::UPDATE, $this->source); | ||||
|         $this->assertFalse($notGranted2); | ||||
|         $this->right->setGrant(false); | ||||
|         $notGranted3 = $this->rightManager->isGranted($this->layer, $this->type, $this->source); | ||||
| @@ -74,7 +74,7 @@ class RightCheckerTest extends TestCase | ||||
|         $this->assertTrue($granted); | ||||
|         $notGranted = $this->rightManager->isGranted(LayerType::SOURCE, $this->type, $secondSource); | ||||
|         $this->assertFalse($notGranted); | ||||
|         $notGranted2 = $this->rightManager->isGranted($this->layer, RightType::WRITE, $secondSource); | ||||
|         $notGranted2 = $this->rightManager->isGranted($this->layer, CRUDType::UPDATE, $secondSource); | ||||
|         $this->assertFalse($notGranted2); | ||||
|         $this->right->setGrant(false); | ||||
|         $notGranted3 = $this->rightManager->isGranted($this->layer, $this->type, $secondSource); | ||||
| @@ -91,7 +91,7 @@ class RightCheckerTest extends TestCase | ||||
|         $this->assertTrue($granted); | ||||
|         $notGranted = $this->rightManager->isGranted(LayerType::SOURCE, $this->type, $thirdSource); | ||||
|         $this->assertFalse($notGranted); | ||||
|         $notGranted2 = $this->rightManager->isGranted($this->layer, RightType::WRITE, $thirdSource); | ||||
|         $notGranted2 = $this->rightManager->isGranted($this->layer, CRUDType::UPDATE, $thirdSource); | ||||
|         $this->assertFalse($notGranted2); | ||||
|         $this->right->setGrant(false); | ||||
|         $notGranted3 = $this->rightManager->isGranted($this->layer, $this->type, $thirdSource); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user