Completed
Push — master ( 5ebda0...7f3442 )
by Andrii
12:49
created

ControllerTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * HiPanel core package
5
 *
6
 * @link      https://hipanel.com/
7
 * @package   hipanel-core
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2014-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hipanel\tests\unit\base;
13
14
use hipanel\base\Controller;
15
16
/**
17
 * Generated by PHPUnit_SkeletonGenerator on 2016-04-27 at 13:36:04.
18
 */
19
class ControllerTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @var Controller
23
     */
24
    protected $object;
25
26
    protected function setUp()
27
    {
28
        $this->object = new Controller('test', null);
0 ignored issues
show
Documentation introduced by
null is of type null, but the function expects a object<yii\base\Module>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
29
    }
30
31
    protected function tearDown()
32
    {
33
    }
34
35
    public function testActions()
36
    {
37
        $this->assertInternalType('array', $this->object->actions());
38
    }
39
40
    public function testBehaviors()
41
    {
42
        $this->assertInternalType('array', $this->object->behaviors());
43
    }
44
}
45