Passed
Push — master ( 494588...ccadcf )
by Fabien
05:22
created

CurriculumVitaeInvalidArgumentExceptionTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testInvalidArgumentExceptionWithNoValidXMLFile() 0 3 1
A testInvalidArgumentExceptionWithFatalErrorXMLFile() 0 3 1
A testInvalidArgumentExceptionWithBadCurriculumVitaeFile() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the FabienCrassat\CurriculumVitaeBundle Symfony bundle.
5
 *
6
 * (c) Fabien Crassat <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FabienCrassat\CurriculumVitaeBundle\Tests\Entity;
13
14
use FabienCrassat\CurriculumVitaeBundle\Entity\CurriculumVitae;
15
16
class CurriculumVitaeInvalidArgumentExceptionTest extends \PHPUnit\Framework\TestCase
17
{
18
    private $curriculumVitae;
19
20
    /**
21
     * @expectedException InvalidArgumentException
22
     */
23
    public function testInvalidArgumentExceptionWithBadCurriculumVitaeFile() {
24
        $this->curriculumVitae = new CurriculumVitae('abd file');
25
    }
26
27
    /**
28
     * @expectedException InvalidArgumentException
29
     */
30
    public function testInvalidArgumentExceptionWithNoValidXMLFile() {
31
        $this->curriculumVitae = new CurriculumVitae( __DIR__.'/../Resources/data/empty.xml');
32
        $this->curriculumVitae->getDropDownLanguages();
33
    }
34
35
    /**
36
     * @expectedException InvalidArgumentException
37
     */
38
    public function testInvalidArgumentExceptionWithFatalErrorXMLFile() {
39
        $this->curriculumVitae = new CurriculumVitae(__DIR__.'/../Resources/data/fatalerror.xml');
40
        $this->curriculumVitae->getDropDownLanguages();
41
    }
42
}
43