GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AjglCsvExtensionTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * AJGL CSV Bundle
5
 *
6
 * Copyright (C) Antonio J. García Lagar <[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 Ajgl\Bundle\CsvBundle\Tests\DependencyInjection;
13
14
use Ajgl\Bundle\CsvBundle\DependencyInjection\AjglCsvExtension;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
17
/**
18
 * @author Antonio J. García Lagar <[email protected]>
19
 */
20
class AjglCsvExtensionTest extends \PHPUnit_Framework_TestCase
21
{
22
    /**
23
     * @var ContainerBuilder
24
     */
25
    protected $container;
26
27
    /**
28
     * @var AjglCsvExtension
29
     */
30
    protected $extension;
31
32
    protected function setUp()
33
    {
34
        $this->container = new ContainerBuilder();
35
        $this->extension = new AjglCsvExtension();
36
    }
37
38
    public function testCsvServiceDefinition()
39
    {
40
        $this->extension->load(array(), $this->container);
41
42
        $this->assertTrue($this->container->hasParameter('ajgl_csv.reader.default_type'));
43
        $this->assertTrue($this->container->hasParameter('ajgl_csv.writer.default_type'));
44
        $this->assertTrue($this->container->hasDefinition('ajgl_csv'));
45
46
        $this->assertSame('php', $this->container->getParameter('ajgl_csv.reader.default_type'));
47
        $this->assertSame('php', $this->container->getParameter('ajgl_csv.writer.default_type'));
48
49
        $definition = $this->container->getDefinition('ajgl_csv');
50
        $this->assertSame(
51
            'Ajgl\Csv\Csv',
52
            $definition->getClass()
53
        );
54
55
        $calls = $definition->getMethodCalls();
56
        $this->assertCount(2, $calls);
57
        foreach ($calls as $call) {
58
            switch ($call[0]) {
59
                case 'setDefaultReaderType':
60
                    $this->assertSame(array('%ajgl_csv.reader.default_type%'), $call[1]);
61
                    break;
62
                case 'setDefaultWriterType':
63
                    $this->assertSame(array('%ajgl_csv.writer.default_type%'), $call[1]);
64
                    break;
65
                default:
66
                    $this->fail("Unexpected method call '{$call[0]}'");
67
            }
68
        }
69
    }
70
}
71