Completed
Push — output_parsers_refactor ( ea70d9...668933 )
by Alessandro
02:32
created

JSONLogFilenameTest::testGenerate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Paraunit\Tests\Unit\Configuration;
4
5
6
use Paraunit\Configuration\JSONLogFilename;
7
use Paraunit\Configuration\Paraunit;
8
use Paraunit\Tests\Stub\StubbedParaProcess;
9
10
/**
11
 * Class JSONLogFilenameTest
12
 * @package Paraunit\Tests\Unit\Configuration
13
 */
14
class JSONLogFilenameTest extends \PHPUnit_Framework_TestCase
15
{
16
    public function testGenerate()
17
    {
18
        $process = new StubbedParaProcess();
19
        $config = new Paraunit();
20
        $fileName = new JSONLogFilename($config);
21
22
        $fileName = $fileName->generate($process);
23
24
        $this->assertEquals($config->getTempDirForThisExecution() . '/logs/' . $process->getUniqueId() . '.json.log', $fileName);
25
    }
26
}
27