mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Implemented TypeAttributTest
This commit is contained in:
		
							
								
								
									
										38
									
								
								application/tests/Unit/Entity/Attribut/TypeAttributTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								application/tests/Unit/Entity/Attribut/TypeAttributTest.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Tests\Unit\Entity\Attribut; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\Attribut\TypeAttributInterface; | ||||
| use App\Entity\Attribut\TypeAttribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| class TypeAttributTest extends TestCase | ||||
| { | ||||
|     /** | ||||
|      * @var TypeAttributInterface | ||||
|      */ | ||||
|     protected $typeAttribut; | ||||
|  | ||||
|     public function setUp(): void | ||||
|     { | ||||
|         $this->typeAttribut = new class() implements TypeAttributInterface { | ||||
|             use TypeAttribut; | ||||
|         }; | ||||
|     } | ||||
|  | ||||
|     public function testConstructor(): void | ||||
|     { | ||||
|         $this->expectException(\TypeError::class); | ||||
|         $this->typeAttribut->getType(); | ||||
|     } | ||||
|  | ||||
|     public function testAccessors(): void | ||||
|     { | ||||
|         $type = 'Hello World!'; | ||||
|         $this->assertNull($this->typeAttribut->setType($type)); | ||||
|         $this->assertEquals($type, $this->typeAttribut->getType()); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user