Updated registration process

This commit is contained in:
Kevin Frantz
2018-09-21 19:43:48 +02:00
parent fcfe1ce9d7
commit f919b0e02c
8 changed files with 45 additions and 36 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace tests\unit\Entity;
use PHPUnit\Framework\TestCase;
@@ -8,18 +9,15 @@ use App\Entity\UserSource;
use App\Entity\Node;
/**
*
* @author kevinfrantz
*/
class UserTest extends TestCase
{
const PASSWORD = '12345678';
const USERNAME = 'tester';
/**
*
* @var User
*/
protected $user;
@@ -40,19 +38,19 @@ class UserTest extends TestCase
$this->user->setPassword(self::PASSWORD);
$this->assertEquals(self::PASSWORD, $this->user->getPassword());
}
public function testSource(): void
{
$this->assertInstanceOf(UserSource::class,$this->user->getSource());
$this->assertInstanceOf(UserSource::class, $this->user->getSource());
}
public function testNode(): void
{
$this->assertInstanceOf(Node::class,$this->user->getSource()->getNode());
$this->assertInstanceOf(Node::class, $this->user->getSource()->getNode());
}
public function testLaw(): void
{
$this->assertInstanceOf(Law::class,$this->user->getSource()->getNode()->getLaw());
$this->assertInstanceOf(Law::class, $this->user->getSource()->getNode()->getLaw());
}
}