mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Implemenented version attribt, repository and tests for right entity
This commit is contained in:
		| @@ -0,0 +1,38 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Tests\Unit\Entity\Attribut; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\Attribut\PriorityAttributInterface; | ||||
| use App\Entity\Attribut\PriorityAttribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| class PriorityAttributTest extends TestCase | ||||
| { | ||||
|     /** | ||||
|      * @var PriorityAttributInterface | ||||
|      */ | ||||
|     protected $priorityAttribut; | ||||
|  | ||||
|     public function setUp(): void | ||||
|     { | ||||
|         $this->priorityAttribut = new class() implements PriorityAttributInterface { | ||||
|             use PriorityAttribut; | ||||
|         }; | ||||
|     } | ||||
|  | ||||
|     public function testConstructor(): void | ||||
|     { | ||||
|         $this->expectException(\TypeError::class); | ||||
|         $this->priorityAttribut->getPriority(); | ||||
|     } | ||||
|  | ||||
|     public function testAccessors(): void | ||||
|     { | ||||
|         $priority = 123; | ||||
|         $this->assertNull($this->priorityAttribut->setPriority($priority)); | ||||
|         $this->assertEquals($priority, $this->priorityAttribut->getPriority()); | ||||
|     } | ||||
| } | ||||
| @@ -29,6 +29,7 @@ class RightTest extends TestCase | ||||
|     { | ||||
|         $this->assertEquals($this->right, $this->right->getReciever()->getRight()); | ||||
|         $this->assertTrue($this->right->getGrant()); | ||||
|         $this->assertEquals(0, $this->right->getPriority()); | ||||
|     } | ||||
|  | ||||
|     public function testConstructorLayer(): void | ||||
|   | ||||
		Reference in New Issue
	
	Block a user