Completed
Push — master ( 63fea9...ea37f6 )
by Gabriel
08:41
created

testCallSameControllerWithParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Controllers\Tests\Traits;
4
5
use Nip\Controllers\Tests\AbstractTest;
6
use Nip\Controllers\Tests\Fixtures\BaseControllerWithUtilityMethods;
7
use Nip\Dispatcher\Dispatcher;
8
use Nip\Request;
9
use Mockery as m;
10
11
/**
12
 * Class DispatchAwareTraitTest
13
 * @package Nip\Controllers\Tests\Traits
14
 */
15
class DispatchAwareTraitTest extends AbstractTest
16
{
17 View Code Duplication
    public function testCallSameControllerWithEmptyParams()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
    {
19
        $controller = new BaseControllerWithUtilityMethods();
20
        $controller->setRequest(new Request());
21
22
        $response = $controller->call('hello');
23
        static::assertSame('hello', $response);
24
    }
25
26 View Code Duplication
    public function testCallSameControllerWithParams()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
27
    {
28
        $controller = new BaseControllerWithUtilityMethods();
29
        $controller->setRequest(new Request());
30
31
        $response = $controller->call('hello', ['John']);
32
        static::assertSame('hello John', $response);
33
    }
34
}
35