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.

BreakpointExtensionTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetName() 0 4 1
A testGetFunctions() 0 12 1
1
<?php
2
3
/*
4
 * AJGL Breakpoint Twig Extension Component
5
 *
6
 * Copyright (C) Antonio J. García Lagar <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ajgl\Twig\Extension\Tests;
13
14
use Ajgl\Twig\Extension\BreakpointExtension;
15
16
/**
17
 * @author Antonio J. García Lagar <[email protected]>
18
 */
19
class BreakpointExtensionTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @var BreakpointExtension
23
     */
24
    protected $extension;
25
26
    protected function setUp()
27
    {
28
        $this->extension = new BreakpointExtension();
29
    }
30
31
    public function testGetName()
32
    {
33
        $this->assertSame('breakpoint', $this->extension->getName());
34
    }
35
36
    public function testGetFunctions()
37
    {
38
        $functions = $this->extension->getFunctions();
39
        $this->assertCount(1, $functions);
40
        $function = reset($functions);
41
        $this->assertInstanceOf('Twig_SimpleFunction', $function);
42
        $callable = $function->getCallable();
43
        $this->assertTrue(is_array($callable));
44
        $this->assertCount(2, $callable);
45
        $this->assertSame($this->extension, $callable[0]);
46
        $this->assertSame('setBreakpoint', $callable[1]);
47
    }
48
}
49