Passed
Pull Request — master (#15)
by Fabien
05:54 queued 03:04
created

testInvalidArgumentExceptionWithBadCurriculumVitaeFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
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