mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			675 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			675 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace App\Entity\Attribut;
 | |
| 
 | |
| use PHPUnit\Framework\TestCase;
 | |
| 
 | |
| class NameAttributTest extends TestCase
 | |
| {
 | |
|     /**
 | |
|      * @var NameAttributInterface
 | |
|      */
 | |
|     public $name;
 | |
|     
 | |
|     public function setUp():void{
 | |
|         $this->name = new class implements NameAttributInterface{
 | |
|             use NameAttribut;
 | |
|         };
 | |
|     }
 | |
|     
 | |
|     public function testConstructor():void{
 | |
|         $this->expectException(\TypeError::class);
 | |
|         $this->name->getName();
 | |
|     }
 | |
|     
 | |
|     public function testAccessors():void{
 | |
|         $name = "hello world!";
 | |
|         $this->assertNull($this->name->setName($name));
 | |
|         $this->assertEquals($name, $this->name->getName());
 | |
|     }
 | |
| }
 | |
| 
 |