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.

LegendTest::testEnabledDisabled()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Ob\HighchartsBundle\Tests\Highcharts;
4
5
use Ob\HighchartsBundle\Highcharts\Highchart;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * This class hold Unit tests for the legend option
10
 */
11
class LegendTest extends TestCase
12
{
13
    /**
14
     * Align option (left/center/right)
15
     */
16
    public function testAlign()
17
    {
18
        $chart = new Highchart();
19
20
        $chart->legend->align("left");
21
        $this->assertRegExp('/legend: \{"align":"left"\}/', $chart->render());
22
23
        $chart->legend->align("center");
24
        $this->assertRegExp('/legend: \{"align":"center"\}/', $chart->render());
25
26
        $chart->legend->align("right");
27
        $this->assertRegExp('/legend: \{"align":"right"\}/', $chart->render());
28
    }
29
30
    /**
31
     * Layout option (horizontal/vertical)
32
     */
33
    public function testLayout()
34
    {
35
        $chart = new Highchart();
36
37
        $chart->legend->layout("horizontal");
38
        $this->assertRegExp('/legend: \{"layout":"horizontal"\}/', $chart->render());
39
40
        $chart->legend->layout("vertical");
41
        $this->assertRegExp('/legend: \{"layout":"vertical"\}/', $chart->render());
42
    }
43
44
    /**
45
     * Enabled option (true/false)
46
     */
47
    public function testEnabledDisabled()
48
    {
49
        $chart = new Highchart();
50
51
        $chart->legend->enabled(false);
52
        $this->assertRegExp('/legend: \{"enabled":false\}/', $chart->render());
53
54
        $chart->legend->enabled(true);
55
        $this->assertRegExp('/legend: \{"enabled":true\}/', $chart->render());
56
    }
57
}
58