mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			841 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			841 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Tests\Entity\Attribut;
 | |
| 
 | |
| use PHPUnit\Framework\TestCase;
 | |
| use App\Entity\Attribut\SlugAttributInterface;
 | |
| use App\Entity\Attribut\SlugAttribut;
 | |
| 
 | |
| /**
 | |
|  * @author kevinfrantz
 | |
|  */
 | |
| class SlugAttributTest extends TestCase
 | |
| {
 | |
|     /**
 | |
|      * @var SlugAttributInterface
 | |
|      */
 | |
|     protected $slugAttribut;
 | |
| 
 | |
|     public function setUp(): void
 | |
|     {
 | |
|         $this->slugAttribut = new class() implements SlugAttributInterface {
 | |
|             use SlugAttribut;
 | |
|         };
 | |
|     }
 | |
| 
 | |
|     public function testConstructor(): void
 | |
|     {
 | |
|         $this->expectException(\TypeError::class);
 | |
|         $this->slugAttribut->getSlug();
 | |
|     }
 | |
| 
 | |
|     public function testAccessors(): void
 | |
|     {
 | |
|         $slug = 'goodslug';
 | |
|         $this->assertNull($this->slugAttribut->setSlug($slug));
 | |
|         $this->assertEquals($slug, $this->slugAttribut->getSlug());
 | |
|     }
 | |
| }
 |