Passed
Push — test ( e89324...128558 )
by Tom
04:08
created

ParseExceptionTest::testGetParseMessage()   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 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* this file is part of pipelines */
4
5
namespace Ktomk\Pipelines\File;
6
7
use Ktomk\Pipelines\TestCase;
8
9
/**
10
 * @covers \Ktomk\Pipelines\File\ParseException
11
 */
12
class ParseExceptionTest extends TestCase
13
{
14
    /**
15
     * @return ParseException
16
     */
17
    public function testCreation()
18
    {
19
        $exception = new ParseException('message string');
20
        self::assertInstanceOf('Ktomk\Pipelines\File\ParseException', $exception);
21
        self::assertInstanceOf('InvalidArgumentException', $exception);
22
        self::assertInstanceOf('Exception', $exception);
23
24
        return $exception;
25
    }
26
27
    /**
28
     * @param ParseException $exception
29
     * @depends testCreation
30
     */
31
    public function testGetParseMessage(ParseException $exception)
32
    {
33
        self::assertIsString($exception->getParseMessage());
34
    }
35
36
    /**
37
     */
38
    public function testThrowing()
39
    {
40
        $this->expectException('Ktomk\Pipelines\File\ParseException');
41
        $this->expectExceptionMessage('message string');
42
43
        throw new ParseException('message string');
44
    }
45
}
46