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::AliasIsAlphaNumeric()   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
namespace Ogone\Tests\Ecommerce;
3
4
use Ogone\Ecommerce\Alias;
5
6
class AliasTest extends \PHPUnit_Framework_TestCase
7
{
8
9
    /** @test */
10
    public function AliasCanHaveUsage()
11
    {
12
        $alias = new Alias('alias123', null, 'usage...');
13
        $this->assertEquals('usage...', $alias->getAliasUsage());
14
    }
15
16
    /** @test */
17
    public function AliasCanHaveOperationByMerchant()
18
    {
19
        $alias = new Alias('alias123');
20
        $this->assertEquals(Alias::OPERATION_BY_MERCHANT, $alias->getAliasOperation());
21
    }
22
23
    /** @test */
24
    public function AliasCanHaveOperationByPsp()
25
    {
26
        $alias = new Alias('alias123', Alias::OPERATION_BY_PSP);
27
        $this->assertEquals(Alias::OPERATION_BY_PSP, $alias->getAliasOperation());
28
    }
29
30
    /**
31
     * @test
32
     * @expectedException \InvalidArgumentException
33
     */
34
    public function AliasIsMax50Characters()
35
    {
36
        new Alias(str_repeat('X', 51));
37
    }
38
39
    /**
40
     * @test
41
     * @expectedException \InvalidArgumentException
42
     */
43
    public function AliasIsAlphaNumeric()
44
    {
45
        new Alias('some alias with spaces, dots (.), etc');
46
    }
47
48
    /** @test */
49
    public function CanBeRepresentedAsString()
50
    {
51
        $this->assertEquals('test123', (string) new Alias('test123'));
52
    }
53
}
54