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::AliasIsMax50Characters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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