Added numeric check for slug attribut

This commit is contained in:
Kevin Frantz committed 2019-01-20 11:03:21 +01:00
1 parent 36c3c28a66
commit c5375d4e0d
3 files changed
+33

No files matched your search

@@ -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');
}
}