You've already forked php-auth
generated from siteworxpro/Php-Template
Initial commit
This commit is contained in:
30
tests/Models/UserTest.php
Normal file
30
tests/Models/UserTest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Siteworxpro\Tests\Models;
|
||||
|
||||
use Siteworxpro\App\Models\User;
|
||||
use Siteworxpro\Tests\Unit;
|
||||
|
||||
class UserTest extends Unit
|
||||
{
|
||||
public function testFormatsName(): void
|
||||
{
|
||||
$user = new User();
|
||||
$user->first_name = 'John';
|
||||
$user->last_name = 'Doe';
|
||||
|
||||
$this->assertEquals('John Doe', $user->full_name);
|
||||
}
|
||||
|
||||
public function testFormatsEmail(): void
|
||||
{
|
||||
$user = new User();
|
||||
$user->first_name = 'Jane';
|
||||
$user->last_name = 'Smith';
|
||||
$user->email = 'jane.smith@email.com';
|
||||
|
||||
$this->assertEquals('Jane Smith <jane.smith@email.com>', $user->formatted_email);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user