Completed
Pull Request — master (#11)
by Fabien
02:52
created

DefaultControllerTest::testDisplay()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
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\Controller;
13
14
use FabienCrassat\CurriculumVitaeBundle\Entity\CurriculumVitae;
15
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
16
use Symfony\Component\Serializer\Serializer;
17
use Symfony\Component\Serializer\Encoder\XmlEncoder;
18
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
19
20
class DefaultControllerTest extends WebTestCase
21
{
22
    public function testIndex()
23
    {
24
        $client = static::createClient();
25
        $client->request('GET', '/');
26
        $this->assertEquals(301, $client->getResponse()->getStatusCode());
27
    }
28
29
    public function testDisplay()
30
    {
31
        $client = static::createClient();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
32
        $crawler = $client->request('GET', '/example');
33
        $this->assertGreaterThan(0, $crawler->filter('html:contains("First Name Last Name")')->count());
34
    }
35
36
    /**
37
     * @expectedException(Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
38
     */
39
    public function testSnappyPDFisNotPresent()
40
    {
41
        $client = static::createClient();
42
        $client->request('GET', '/example/en/pdf');
43
    }
44
45
    /**
46
     * @expectedException(Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
47
     */
48
    public function testCVDoesNotExistIndex()
49
    {
50
        $client = static::createClient();
51
        $client->request('GET', '/nofile');
52
    }
53
54
    /**
55
     * @expectedException(Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
56
     */
57
    public function testBadLanguage()
58
    {
59
        $client = static::createClient();
60
        $client->request('GET', '/example/XX');
61
    }
62
63
    private $ReadCVXml;
0 ignored issues
show
Coding Style introduced by
$ReadCVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
64
    private $client;
65
66
    public function testOutputHtmlXmlComparaison()
67
    {
68
        $this->client = static::createClient();
69
70
        $langs = array('en', 'fr');
71
        foreach ($langs as $value) {
72
            $this->OutputHtmlXmlComparaison($value);
73
        }
74
    }
75
76
    public function testOutputJSONXmlComparaison()
77
    {
78
        $this->client = static::createClient();
79
80
        $langs = array('en', 'fr');
81
        foreach ($langs as $value) {
82
            $this->client->request('GET', '/example/'.$value.'.json');
83
            $response = $this->client->getResponse();
84
            $data = json_decode($response->getContent(), TRUE);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
85
86
            // Read the Curriculum Vitae
87
            $pathToFile = __DIR__.'/../../Resources/data/example.xml';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
88
            $this->ReadCVXml = new CurriculumVitae($pathToFile, $value);
89
90
            $CVXml = array(
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
91
                'identity'          => $this->ReadCVXml->getIdentity(),
92
                'followMe'          => $this->ReadCVXml->getFollowMe(),
93
                'lookingFor'        => $this->ReadCVXml->getLookingFor(),
94
                'experiences'       => $this->ReadCVXml->getExperiences(),
95
                'skills'            => $this->ReadCVXml->getSkills(),
96
                'educations'        => $this->ReadCVXml->getEducations(),
97
                'languageSkills'    => $this->ReadCVXml->getLanguageSkills(),
98
                'miscellaneous'     => $this->ReadCVXml->getMiscellaneous()
99
            );
100
101
            $this->assertSame($CVXml, $data);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
102
        }
103
    }
104
105
    public function testOutputXmlXmlComparaison()
106
    {
107
        $this->client = static::createClient();
108
109
        $langs = array('en', 'fr');
110
        foreach ($langs as $value) {
111
            $this->client->request('GET', '/example/'.$value.'.xml');
112
            $response = $this->client->getResponse();
113
            $response->headers->set('Content-Type', 'application/xml');
114
            $data = $response->getContent();
115
116
            // Read the Curriculum Vitae
117
            $pathToFile = __DIR__.'/../../Resources/data/example.xml';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
118
            $this->ReadCVXml = new CurriculumVitae($pathToFile, $value);
119
120
            $CVXml = array(
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
121
                'identity'          => $this->ReadCVXml->getIdentity(),
122
                'followMe'          => $this->ReadCVXml->getFollowMe(),
123
                'lookingFor'        => $this->ReadCVXml->getLookingFor(),
124
                'experiences'       => $this->ReadCVXml->getExperiences(),
125
                'skills'            => $this->ReadCVXml->getSkills(),
126
                'educations'        => $this->ReadCVXml->getEducations(),
127
                'languageSkills'    => $this->ReadCVXml->getLanguageSkills(),
128
                'miscellaneous'     => $this->ReadCVXml->getMiscellaneous()
129
            );
130
            //initialisation du serializer
131
            $encoders = array(new XmlEncoder('CurriculumVitae'));
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
132
            $normalizers = array(new GetSetMethodNormalizer());
133
            $serializer = new Serializer($normalizers, $encoders);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
134
135
            $this->assertSame($serializer->serialize($CVXml, 'xml'), $data);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
136
        }
137
    }
138
139
    public function testOutputFollowMeLink()
140
    {
141
        $this->client = static::createClient();
142
143
        $langs = array('en', 'fr');
144
        foreach ($langs as $lang) {
145
            $crawler = $this->client->request('GET', '/example/'.$lang);
146
147
            // Read the Curriculum Vitae
148
            $pathToFile = __DIR__.'/../../Resources/data/example.xml';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
149
            $this->ReadCVXml = new CurriculumVitae($pathToFile, $lang);
150
151
            $CVXml = array('followMe' => $this->ReadCVXml->getFollowMe());
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
152
153
            $testValue = $this->array_values_recursive($CVXml);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
154
            foreach ($testValue as $value) {
155
                $alt = $crawler->filter('img[alt="'.$value.'"]')->count();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
156
                $alt += $crawler->filter('img[title="'.$value.'"]')->count();
157
                $alt += $crawler->filter('img[src="/'.$value.'"]')->count();
158
                $alt += $crawler->filter('a[href="'.$value.'"]')->count();
159
160
                $this->assertGreaterThan(0, $alt,
161
                    'The value '.$value.' is not diplay for language '.$lang
162
                );
163
            }
164
        }
165
    }
166
167
    private function OutputHtmlXmlComparaison($lang = 'en')
0 ignored issues
show
Coding Style introduced by
function OutputHtmlXmlComparaison() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
168
    {
169
        $crawler = $this->client->request('GET', '/example/'.$lang);
170
171
        // Read the Curriculum Vitae
172
        $pathToFile = __DIR__.'/../../Resources/data/example.xml';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
173
        $this->ReadCVXml = new CurriculumVitae($pathToFile, $lang);
174
175
        $CVXml = array(
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
176
                'identity'          => $this->ReadCVXml->getIdentity(),
177
                'lookingFor'        => $this->ReadCVXml->getLookingFor(),
178
                'experiences'       => $this->ReadCVXml->getExperiences(),
179
                'skills'            => $this->ReadCVXml->getSkills(),
180
                'educations'        => $this->ReadCVXml->getEducations(),
181
                'languageSkills'    => $this->ReadCVXml->getLanguageSkills(),
182
                'miscellaneous'     => $this->ReadCVXml->getMiscellaneous()
183
        );
184
        # Remove all no visible elements
0 ignored issues
show
Coding Style introduced by
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Loading history...
185
        switch ($lang) {
186
            case 'en':
187
                unset($CVXml['identity']['myself']['birthday']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
188
                break;
189
            default:
190
                # code...
0 ignored issues
show
Coding Style introduced by
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Loading history...
191
                break;
192
        }
193
        unset($CVXml['identity']['myself']['picture']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
194
        unset($CVXml['identity']['address']['street']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
195
        unset($CVXml['identity']['address']['postalcode']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
196
        unset($CVXml['identity']['address']['googlemap']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
197
        unset($CVXml['identity']['contact']['mobile']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
198
        unset($CVXml['experiences']['FirstExperience']['society']['society']['ref']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
199
        unset($CVXml['experiences']['FirstExperience']['society']['siteurl']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
200
        unset($CVXml['experiences']['SecondExperience']['collapse']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
201
        unset($CVXml['experiences']['SecondExperience']['society']['society']['ref']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
202
        unset($CVXml['experiences']['SecondExperience']['society']['siteurl']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
203
        unset($CVXml['experiences']['ThirdExperience']['society']['society']['ref']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
204
        unset($CVXml['experiences']['FourthExperience']['collapse']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
205
        unset($CVXml['skills']['Functional']['lines']['success']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
206
        unset($CVXml['skills']['Functional']['lines']['success']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
207
        unset($CVXml['skills']['Functional']['lines']['success']['striped']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
208
        unset($CVXml['skills']['Functional']['lines']['otherSucess']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
209
        unset($CVXml['skills']['Functional']['lines']['otherSucess']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
210
        unset($CVXml['skills']['Functional']['lines']['info']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
211
        unset($CVXml['skills']['Functional']['lines']['info']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
212
        unset($CVXml['skills']['Functional']['lines']['info']['striped']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
213
        unset($CVXml['skills']['Functional']['lines']['warning']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
214
        unset($CVXml['skills']['Functional']['lines']['warning']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
215
        unset($CVXml['skills']['Functional']['lines']['danger']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
216
        unset($CVXml['skills']['Functional']['lines']['danger']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
217
        unset($CVXml['skills']['Functional']['lines']['noClass']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
218
        unset($CVXml['skills']['OtherSkill']['lines']['success']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
219
        unset($CVXml['skills']['OtherSkill']['lines']['success']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
220
        unset($CVXml['skills']['OtherSkill']['lines']['success']['striped']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
221
        unset($CVXml['skills']['OtherSkill']['lines']['info']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
222
        unset($CVXml['skills']['OtherSkill']['lines']['info']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
223
        unset($CVXml['skills']['OtherSkill']['lines']['info']['striped']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
224
        unset($CVXml['skills']['OtherSkill']['lines']['warning']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
225
        unset($CVXml['skills']['OtherSkill']['lines']['warning']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
226
        unset($CVXml['skills']['OtherSkill']['lines']['warning']['striped']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
227
        unset($CVXml['skills']['OtherSkill']['lines']['danger']['percentage']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
228
        unset($CVXml['skills']['OtherSkill']['lines']['danger']['class']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
229
        unset($CVXml['skills']['OtherSkill']['lines']['danger']['striped']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
230
        unset($CVXml['educations']['HighSchool']['collapse']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
231
        unset($CVXml['educations']['FirstSchool']['collapse']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
232
        unset($CVXml['languageSkills']['French']['icon']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
233
        unset($CVXml['languageSkills']['English']['icon']);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
234
235
        $testValue = $this->array_values_recursive($CVXml);
0 ignored issues
show
Coding Style introduced by
$CVXml does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
236
        foreach ($testValue as $value) {
237
            $this->assertGreaterThan(0,
238
                $crawler->filter('html:contains("'.$value.'")')->count(),
239
                'The value '.$value.' is not diplay for language '.$lang
240
            );
241
        }
242
    }
243
244
    private function array_values_recursive($array)
0 ignored issues
show
Coding Style introduced by
function array_values_recursive() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
245
    {
246
        $return = array();
247
        foreach($array as $value) {
248
            $return = $this->array_values_merge($return, $value);
249
        }
250
        return $return;
251
    }
252
253
    private function array_values_merge($return, $value)
0 ignored issues
show
Coding Style introduced by
function array_values_merge() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
254
    {
255
        if(is_array($value)) {
256
            return array_merge($return, $this->array_values_recursive($value));
257
        }
258
259
        return array_merge($return, array($value));
260
    }
261
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
262