mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Refactored\moved Attribut folder
This commit is contained in:
33
application/symfony/tests/Unit/Attribut/NameAttributTest.php
Normal file
33
application/symfony/tests/Unit/Attribut/NameAttributTest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user