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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 47
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testAlign() 0 13 1
A testLayout() 0 10 1
A testEnabledDisabled() 0 10 1
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