Completed
Push — output_parsers_refactor ( 710907...9ffc6c )
by Alessandro
02:42
created

testFetchThrowsExceptionWithMissingLog()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Paraunit\Tests\Unit\Parser;
4
5
use Paraunit\Parser\JSONLogFetcher;
6
use Paraunit\Tests\Stub\StubbedParaProcess;
7
8
/**
9
 * Class JSONLogFetcherTest
10
 * @package Paraunit\Tests\Unit\Parser
11
 */
12
class JSONLogFetcherTest extends \PHPUnit_Framework_TestCase
13
{
14
    public function testFetchThrowsExceptionWithMissingLog()
15
    {
16
        $process = new StubbedParaProcess();
17
18
        $fileName = $this->prophesize('Paraunit\Configuration\JSONLogFileName');
19
        $fileName->generate($process)->willReturn('log.json');
20
21
        $fetcher = new JSONLogFetcher($fileName->reveal());
22
23
        $this->setExpectedException('Paraunit\Exception\JSONLogNotFoundException');
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::setExpectedException() has been deprecated with message: Method deprecated since Release 5.2.0

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
24
25
        $fetcher->fetch($process);
26
    }
27
}
28