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

HighchartTest::testNoEngine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Ob\HighchartsBundle\Tests\Highcharts;
4
5
use Ob\HighchartsBundle\Highcharts\Highchart;
6
7
/**
8
 * This class hold Unit tests for the Highchart Class
9
 */
10
class HighchartTest extends \PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * Render chart using jQuery
14
     */
15
    public function testJquery()
16
    {
17
        $chart = new Highchart();
18
        $this->assertRegExp(
19
            '/\$\(function\s?\(\)\s?\{\n?\r?\s*var chart = new Highcharts.Chart\(\{\n?\r?\s*\}\);\n?\r?\s*\}\);/',
20
            $chart->render()
21
        );
22
    }
23
24
    /**
25
     * Render chart without library wrapper
26
     */
27
    public function testNoEngine()
28
    {
29
        $chart = new Highchart();
30
        $this->assertRegExp(
31
            '/var chart = new Highcharts.Chart\(\{\n?\r?\s*\}\);/',
32
            $chart->render(null)
33
        );
34
    }
35
36
    /**
37
     * Render chart using Mootools
38
     */
39
    public function testMooTools()
40
    {
41
        $chart = new Highchart();
42
        $this->assertRegExp(
43
            '/window.addEvent\(\'domready\', function\s?\(\)\s?\{\r?\n?\s*var chart = new Highcharts.Chart\(\{\n?\r?\s*\}\);\n?\r?\s*\}\);/',
44
            $chart->render('mootools')
45
        );
46
    }
47
48
    /**
49
     * Magic getters and setters
50
     */
51
    public function testSetGet()
52
    {
53
        $chart = new Highchart();
54
55
        $chart->credits->enabled(false);
56
        $this->assertTrue($chart->credits->enabled == false);
57
58
        $chart->credits->enabled(true);
59
        $this->assertTrue($chart->credits->enabled == true);
60
    }
61
62
    /**
63
     * Look for that mean trailing comma
64
     */
65
    public function testIeFriendliness()
66
    {
67
        $chart = new Highchart();
68
69
        $chart->chart->setTitle('Am I IE friendly yet?');
70
        $this->assertRegExp(
71
            '/\}(?<!,)\n?\r?\s*\}\);\n?\r?\s*\}\);/',
72
            $chart->render()
73
        );
74
    }
75
}
76