TestCase::assertHandleException()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 10
c 1
b 0
f 1
rs 9.4285
cc 2
eloc 6
nc 2
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: roma_bb8
5
 * Date: 30.03.18
6
 * Time: 11:47
7
 */
8
9
namespace Symfony\Component\Debug\Extension\Tests;
10
11
12
use \PHPUnit\Framework\TestCase as BaseTestCase;
13
14
/**
15
 * Class TestCase
16
 * @package Symfony\Component\Debug\Extension\Tests
17
 */
18
class TestCase extends BaseTestCase {
19
20
    /**
21
     * @return string
22
     */
23
    public static function getRootFolder() {
24
        return dirname(__DIR__) . DIRECTORY_SEPARATOR;
25
    }
26
27
    /**
28
     * @param string $file
29
     */
30
    public function assertHandleException($file) {
31
32
        if (false === file_exists($file)) {
33
            $this->assertTrue(false);
34
            return;
35
        }
36
37
        $this->assertTrue(true);
38
        unlink($file);
39
    }
40
}
41