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

CreditsTest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 6
c 2
b 0
f 1
lcom 1
cbo 1
dl 0
loc 65
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testHref() 0 7 1
A testPosition() 0 13 1
A testStyle() 0 12 1
A testText() 0 7 1
A testEnabled() 0 10 1
1
<?php
2
3
namespace Ob\HighchartsBundle\Tests\Highstock;
4
5
use Ob\HighchartsBundle\Highcharts\Highstock;
6
7
class CreditsTest extends \PHPUnit_Framework_TestCase
8
{
9
    protected $chart;
10
    protected $credits;
11
12
    protected function setUp()
13
    {
14
        $this->chart = new Highstock();
15
        $this->credits = $this->chart->credits;
16
    }
17
18
    public function testEnabled()
19
    {
20
        $this->credits->enabled(true);
21
        $this->assertTrue($this->credits->enabled);
22
        $this->assertRegExp('/"enabled":true/', $this->chart->render());
23
24
        $this->credits->enabled(false);
25
        $this->assertFalse($this->credits->enabled);
26
        $this->assertRegExp('/"enabled":false/', $this->chart->render());
27
    }
28
29
    public function testHref()
30
    {
31
        $link = "http://www.highcharts.com";
32
        $this->credits->href($link);
33
        $this->assertEquals($link, $this->credits->href);
34
//        $this->assertRegExp('/"href":"http:\/\/www\.highcharts\.com"/', $this->chart->render());
35
    }
36
37
    public function testPosition()
38
    {
39
        $position = array(
40
            'align' => 'right',
41
            'x' => -10,
42
            'verticalAlign' => 'bottom',
43
            'y' => -5
44
        );
45
46
        $this->credits->position($position);
47
        $this->assertEquals($this->credits->position, $position);
48
        $this->assertRegExp('/"position":{"align":"right","x":-10,"verticalAlign":"bottom","y":-5}/', $this->chart->render());
49
    }
50
51
    public function testStyle()
52
    {
53
        $style = array(
54
            'cursor' => 'pointer',
55
            'color' => '#909090',
56
            'fontSize' => '10px'
57
        );
58
59
        $this->credits->style($style);
60
        $this->assertEquals($style, $this->credits->style);
61
        $this->assertRegExp('/"style":{"cursor":"pointer","color":"#909090","fontSize":"10px"}/', $this->chart->render());
62
    }
63
64
    public function testText()
65
    {
66
        $text = "Highcharts.com";
67
        $this->credits->text($text);
68
        $this->assertEquals($text, $this->credits->text);
69
        $this->assertRegExp('/"text":"Highcharts.com"/', $this->chart->render());
70
    }
71
}
72