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.

AliasTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A AliasCannotBeNull() 0 4 1
A AliasCannotBeAnEmptyString() 0 4 1
A AliasIsMax50Characters() 0 4 1
A AliasIsAlphaNumeric() 0 4 1
A CanBeRepresentedAsString() 0 6 1
1
<?php
2
/*
3
 * This file is part of the Marlon Ogone package.
4
 *
5
 * (c) Marlon BVBA <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Ogone\Tests\DirectLink;
12
13
use Ogone\DirectLink\Alias;
14
15
class AliasTest extends \PHPUnit_Framework_TestCase
16
{
17
    /**
18
     * @test
19
     * @expectedException \InvalidArgumentException
20
     */
21
    public function AliasCannotBeNull()
22
    {
23
        new Alias(null);
24
    }
25
26
    /**
27
     * @test
28
     * @expectedException \InvalidArgumentException
29
     */
30
    public function AliasCannotBeAnEmptyString()
31
    {
32
        new Alias('');
33
    }
34
35
    /**
36
     * @test
37
     * @expectedException \InvalidArgumentException
38
     */
39
    public function AliasIsMax50Characters()
40
    {
41
        new Alias(str_repeat('X', 51));
42
    }
43
44
    /**
45
     * @test
46
     * @expectedException \InvalidArgumentException
47
     */
48
    public function AliasIsAlphaNumeric()
49
    {
50
        new Alias('some alias with spaces, dots (.), etc');
51
    }
52
53
    /** @test */
54
    public function CanBeRepresentedAsString()
55
    {
56
        $alias = new Alias('test123');
57
        $this->assertEquals('test123', (string) new Alias('test123'));
58
        $this->assertEquals('test123', $alias->getAlias());
59
    }
60
}
61