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.
Completed
Push — master ( bb8806...1a2c53 )
by Marc
10s
created

TwigTest::testTwigExtension()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 25
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 25
rs 8.8571
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
namespace Ob\HighchartsBundle\Tests\Highcharts;
4
5
use Ob\HighchartsBundle\Highcharts\Highchart;
6
use Ob\HighchartsBundle\Twig\HighchartsExtension;
7
8
/**
9
 * This class hold Unit tests for the Twig extension
10
 */
11
class TwigTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * Chart rendering using the twig extension
15
     */
16
    public function testTwigExtension()
17
    {
18
        $chart = new Highchart();
19
        $extension = new HighchartsExtension();
20
21
        $this->assertEquals('highcharts_extension', $extension->getName());
22
23
        // render with jquery
24
        $this->assertRegExp(
25
            '/\$\(function\s?\(\)\s?\{\n?\r?\s*var chart = new Highcharts.Chart\(\{\n?\r?\s*\}\);\n?\r?\s*\}\);/',
26
            $extension->chart($chart)
27
        );
28
29
        // render with jquery explicitly
30
        $this->assertRegExp(
31
            '/\$\(function\s?\(\)\s?\{\n?\r?\s*var chart = new Highcharts.Chart\(\{\n?\r?\s*\}\);\n?\r?\s*\}\);/',
32
            $extension->chart($chart, 'jquery')
33
        );
34
35
        // render with mootools
36
        $this->assertRegExp(
37
            '/window.addEvent\(\'domready\', function\s?\(\)\s?\{\r?\n?\s*var chart = new Highcharts.Chart\(\{\n?\r?\s*\}\);\n?\r?\s*\}\);/',
38
            $extension->chart($chart, 'mootools')
39
        );
40
    }
41
}
42