Completed
Pull Request — 5.1 (#1327)
by
unknown
05:23
created

fileTest::testRecord()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
// +----------------------------------------------------------------------
1 ignored issue
show
Coding Style introduced by
You must use "/**" style comments for a file comment
Loading history...
3
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
4
// +----------------------------------------------------------------------
5
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
6
// +----------------------------------------------------------------------
7
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
8
// +----------------------------------------------------------------------
9
// | Author: liu21st <[email protected]>
10
// +----------------------------------------------------------------------
11
12
/**
13
 * Test File Log
14
 */
15
namespace tests\thinkphp\library\think\log\driver;
16
17
use think\Log;
18
19
class fileTest extends \PHPUnit_Framework_TestCase
1 ignored issue
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...
Coding Style introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name must begin with a capital letter
Loading history...
20
{
21
    protected function setUp()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
22
    {
23
        Log::init(['type' => 'file']);
24
    }
25
26
    public function testRecord()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
27
    {
28
        $record_msg = 'record';
29
        Log::record($record_msg, 'notice');
30
        $logs = Log::getLog();
31
32
        $this->assertEquals([], $logs);
33
    }
34
}
35