testIfAnExportPDFServiceIsNotPresent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 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\Controller;
13
14
use FabienCrassat\CurriculumVitaeBundle\Entity\CurriculumVitae;
15
use FabienCrassat\CurriculumVitaeBundle\Utility\ArrayFunctions;
16
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
17
use Symfony\Component\Serializer\Serializer;
18
use Symfony\Component\Serializer\Encoder\XmlEncoder;
19
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
20
21
class DefaultControllerExpectedExceptionTest extends WebTestCase
22
{
23
    /**
24
     * @expectedException(Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
25
     */
26
    public function testIfAnExportPDFServiceIsNotPresent()
27
    {
28
        $client = static::createClient();
29
        $client->request('GET', '/example/en/pdf');
30
        $this->assertEquals(404, $client->getResponse()->getStatusCode());
31
    }
32
33
    /**
34
     * @expectedException(Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
35
     */
36
    public function testCVDoesNotExistIndex()
37
    {
38
        $client = static::createClient();
39
        $client->request('GET', '/nofile');
40
        $this->assertEquals(404, $client->getResponse()->getStatusCode());
41
    }
42
43
    /**
44
     * @expectedException(Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
45
     */
46
    public function testBadLanguage()
47
    {
48
        $client = static::createClient();
49
        $client->request('GET', '/example/XX');
50
        $this->assertEquals(404, $client->getResponse()->getStatusCode());
51
    }
52
}
53