User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMock() 0 11 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace User\Tests\Mock\Service;
5
6
use User\Service\UserInterface;
7
use Mockery as m;
8
9
/**
10
 * User Service Mock
11
 *
12
 * @author Thiago Paes <[email protected]>
13
 */
14
abstract class User
15
{
16
    /**
17
     * @return m\MockInterface
18
     */
19
    public static function getMock()
20
    {
21
        $user = m::mock(UserInterface::class);
22
        $user->shouldReceive('save')->andReturn(true)->byDefault();
23
        $user->shouldReceive('delete')->andReturn(true)->byDefault();
24
        $user->shouldReceive('update')->andReturn(true)->byDefault();
25
        $user->shouldReceive('findByUserId')->andReturn(true)->byDefault();
26
        $user->shouldReceive('listAll')->andReturn(true)->byDefault();
27
28
        return $user;
29
    }
30
}
31