Commit f6a3a4f2 authored by Viral Solani's avatar Viral Solani

Unit Test Cases - User Model

parent f07b6bcc
<?php
namespace Tests\Unit;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->assertTrue(true);
}
}
<?php
namespace Tests\Unit\Models;
use Tests\TestCase;
class UserTest extends TestCase
{
/** @test */
function a_user_has_a_roles()
{
$this->assertInstanceOf(
'Illuminate\Database\Eloquent\Collection', $this->admin->roles
);
}
/** @test */
function a_user_has_a_permissions()
{
$this->assertInstanceOf(
'Illuminate\Database\Eloquent\Collection', $this->admin->permissions
);
}
/** @test */
function a_user_has_a_providers()
{
$this->assertInstanceOf(
'Illuminate\Database\Eloquent\Collection', $this->admin->providers
);
}
/** @test */
function a_user_has_a_sessions()
{
$this->assertInstanceOf(
'Illuminate\Database\Eloquent\Collection', $this->admin->sessions
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment