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:
36
application/symfony/tests/Unit/Attribut/UserAttributTest.php
Normal file
36
application/symfony/tests/Unit/Attribut/UserAttributTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Attribut;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Attribut\UserAttributInterface;
|
||||
use App\Attribut\UserAttribut;
|
||||
use App\Entity\UserInterface;
|
||||
|
||||
class UserAttributTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var UserAttributInterface
|
||||
*/
|
||||
public $user;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->user = new class() implements UserAttributInterface {
|
||||
use UserAttribut;
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->user->getUser();
|
||||
}
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
$user = $this->createMock(UserInterface::class);
|
||||
$this->assertNull($this->user->setUser($user));
|
||||
$this->assertEquals($user, $this->user->getUser());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user