2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
2017-07-11 20:37:02 -07:00
|
|
|
class UserTest extends BaseTest
|
2016-03-25 01:18:05 -07:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \UnitTester
|
|
|
|
*/
|
|
|
|
protected $tester;
|
2017-06-12 17:39:03 -07:00
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
public function testUserAdd()
|
|
|
|
{
|
2017-06-12 17:39:03 -07:00
|
|
|
$user = factory(User::class)->make();
|
2016-03-25 01:18:05 -07:00
|
|
|
$values = [
|
|
|
|
'first_name' => $user->first_name,
|
|
|
|
'last_name' => $user->last_name,
|
|
|
|
'email' => $user->email,
|
|
|
|
'username' => $user->username,
|
|
|
|
'password' => $user->password,
|
|
|
|
];
|
|
|
|
|
|
|
|
User::create($values);
|
|
|
|
$this->tester->seeRecord('users', $values);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|