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.

SetTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 38
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGet() 0 16 1
A testGetNonExisting() 0 7 1
1
<?php
2
namespace Naneau\FileGen\Test\Parameter;
3
4
use Naneau\FileGen\Parameter\Set as ParameterSet;
5
use Naneau\FileGen\Parameter\Parameter;
6
7
class SetTest extends \PHPUnit\Framework\TestCase
8
{
9
    /**
10
     * Test add/get
11
     *
12
     * @return void
13
     **/
14
    public function testGet()
15
    {
16
        $set = new ParameterSet;
17
        $set
18
            ->add('foo', 'bar')
19
            ->add('baz', 'qux');
20
21
        $this->assertInstanceOf(
22
            'Naneau\FileGen\Parameter\Parameter',
23
            $set->get('foo')
24
        );
25
        $this->assertInstanceOf(
26
            'Naneau\FileGen\Parameter\Parameter',
27
            $set->get('baz')
28
        );
29
    }
30
31
    /**
32
     * Test get of param that's absent
33
     *
34
     * @expectedException Naneau\FileGen\Exception
35
     * @return void
36
     **/
37
    public function testGetNonExisting()
38
    {
39
        $set = new ParameterSet;
40
        $set->add('foo', 'bar');
41
42
        $set->get('baz');
43
    }
44
}
45