Passed
Push — master ( f5f798...b56d23 )
by Vladimir
04:20
created

Test::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the `tvi/monitor-bundle` project.
4
 *
5
 * (c) https://github.com/turnaev/monitor-bundle/graphs/contributors
6
 *
7
 * For the full copyright and license information, please view the LICENSE.md
8
 * file that was distributed with this source code.
9
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
10
11
namespace Tvi\MonitorBundle\Check\php\ClassExists;
12
13
use ZendDiagnostics\Result\FailureInterface;
14
use ZendDiagnostics\Result\ResultInterface;
15
use Tvi\MonitorBundle\Check\CheckInterface;
16
use Tvi\MonitorBundle\Test\Check\CheckTestCase;
17
use ZendDiagnostics\Result\SuccessInterface;
18
19
/**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
20
 * @author Vladimir Turnaev <[email protected]>
21
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
22
class Test extends CheckTestCase
23
{
24
    public function testIntegration()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function testIntegration()
Loading history...
25
    {
26
        $this->iterateConfTest(__DIR__ . '/config.example.yml');
27
    }
28
29
    public function testCheck()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function testCheck()
Loading history...
30
    {
31
        $check = new Check(self::class);
32
        $this->assertInstanceOf(CheckInterface::class, $check);
33
        $this->assertInstanceOf(ResultInterface::class, $check->check());
34
    }
35
36
    public function testCases()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function testCases()
Loading history...
37
    {
38
        $check = new Check(self::class);
39
        $this->assertInstanceOf(SuccessInterface::class, $check->check());
40
41
        $check = new Check('note_exuist_class');
42
        $this->assertInstanceOf(FailureInterface::class, $check->check());
43
44
        $check = new Check(['note_exuist_class', self::class]);
45
        $this->assertInstanceOf(FailureInterface::class, $check->check());
46
    }
47
}
48