mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	Added numeric check for slug attribut
This commit is contained in:
		@@ -5,6 +5,7 @@ namespace Tests\Attribut;
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
use App\Attribut\SlugAttributInterface;
 | 
			
		||||
use App\Attribut\SlugAttribut;
 | 
			
		||||
use App\Exception\UnvalidValueException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author kevinfrantz
 | 
			
		||||
@@ -39,4 +40,10 @@ class SlugAttributTest extends TestCase
 | 
			
		||||
        $this->assertNull($this->slugAttribut->setSlug(''));
 | 
			
		||||
        $this->assertTrue($this->slugAttribut->hasSlug());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testNumericSetException(): void
 | 
			
		||||
    {
 | 
			
		||||
        $this->expectException(UnvalidValueException::class);
 | 
			
		||||
        $this->slugAttribut->setSlug('1234');
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user