Completed
Push — master ( b12bdf...15cd89 )
by Andrii
04:24
created

NginxControllerTest::testConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * HiDev plugin for NGINX.
4
 *
5
 * @link      https://github.com/hiqdev/hidev-nginx
6
 * @package   hidev-nginx
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\nginx\tests\unit\console;
12
13
use hidev\nginx\console\NginxController;
14
15
/**
16
 * Generated by PHPUnit_SkeletonGenerator on 2016-04-14 at 11:42:17.
17
 */
18
class NginxControllerTest extends \PHPUnit\Framework\TestCase
19
{
20
    /**
21
     * @var NginxController
22
     */
23
    protected $object;
24
    protected $ip = '1.1.1.1';
25
26
    protected function setUp()
27
    {
28
        $this->object = new NginxController('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 testConstruct()
36
    {
37
        $this->assertInstanceOf(NginxController::class, $this->object);
38
    }
39
}
40