mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 05:47:11 +02:00
Made user for UserAttribut optional
This commit is contained in:
@@ -7,6 +7,9 @@ use App\Attribut\UserAttributInterface;
|
||||
use App\Attribut\UserAttribut;
|
||||
use App\Entity\UserInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class UserAttributTest extends TestCase
|
||||
{
|
||||
/**
|
||||
@@ -23,6 +26,7 @@ class UserAttributTest extends TestCase
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->assertFalse($this->user->hasUser());
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->user->getUser();
|
||||
}
|
||||
@@ -32,5 +36,6 @@ class UserAttributTest extends TestCase
|
||||
$user = $this->createMock(UserInterface::class);
|
||||
$this->assertNull($this->user->setUser($user));
|
||||
$this->assertEquals($user, $this->user->getUser());
|
||||
$this->assertTrue($this->user->hasUser());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user