NginxTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
c 1
b 0
f 1
dl 0
loc 23
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A testMinimal() 0 5 1
A setUp() 0 4 1
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\functional;
12
13
use hidev\tests\functional\Tester;
14
15
class NginxTest extends \PHPUnit\Framework\TestCase
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
{
17
    /**
18
     * @var \FunctionalTester
19
     */
20
    protected $tester;
21
22
    protected function setUp()
23
    {
24
        $this->tester = new Tester($this);
0 ignored issues
show
Documentation Bug introduced by
It seems like new hidev\tests\functional\Tester($this) of type hidev\tests\functional\Tester is incompatible with the declared type FunctionalTester of property $tester.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
25
        $this->tester->clean = true;
26
    }
27
28
    protected function tearDown()
29
    {
30
        $this->tester = null;
31
    }
32
33
    public function testMinimal()
34
    {
35
        $this->tester->config(__DIR__ . '/minimal/.hidev/config.yml');
36
        $this->tester->hidev('nginx/dump');
37
        $this->tester->assertFiles(__DIR__ . '/minimal', ['.']);
38
    }
39
}
40