infinito/application/tests/unit/Entity/UserTest.php
Marco Petersen f1b9ffd160 Format code
2018-09-12 23:25:22 +03:00

39 lines
721 B
PHP

<?php
namespace tests\unit\Entity;
use PHPUnit\Framework\TestCase;
use App\Entity\User;
/**
* @author kevinfrantz
*/
class UserTest extends TestCase
{
const PASSWORD = '12345678';
const USERNAME = 'tester';
/**
* @var User
*/
protected $user;
public function setUp(): void
{
$this->user = new User();
$this->user->setPassword(self::PASSWORD);
$this->user->setUsername(' '.self::USERNAME.' ');
}
public function testUsername(): void
{
$this->assertEquals(self::USERNAME, $this->user->getUsername());
}
public function testPassword(): void
{
$this->assertEquals(self::PASSWORD, $this->user->getPassword());
}
}