Completed
Push — dev ( 9d9792...d17935 )
by Tristan
08:47 queued 10s
created

BasePolicyTest::createUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Tests\Unit;
4
5
use Tests\TestCase;
6
use Illuminate\Foundation\Testing\WithFaker;
7
use Illuminate\Foundation\Testing\RefreshDatabase;
8
9
/**
10
 * A base class for Policy tests
11
 */
12
13
abstract class BasePolicyTest extends TestCase {
14
15
    //create basic user
16
    public function createUser() {
17
        $user = factory(\App\Models\User::class)->create();
18
        return $user;
19
    }
20
21
    //create applicant, factory includes a user
22
    public function createApplicant() {
23
        $applicant = factory(\App\Models\Applicant::class)->create();
24
        return $applicant;
25
    }
26
    //create manager, factory includes a user
27
    public function createManager() {
28
        $manager = factory(\App\Models\Manager::class)->create();
29
        return $manager;
30
    }
31
32
    /*
33
    protected function makeJobPoster() {
34
        $jobPoster = JobPoster::make();
35
    }
36
37
    //makeJob($manager) {}
38
39
    //makeApplication($applicant, $job) {}
40
    */
41
}
42