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.

Base64Test   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
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 32
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testEncode() 0 5 1
A testDecode() 0 5 1
1
<?php
2
3
namespace Emarref\Jwt\Encoding;
4
5
class Base64Test extends \PHPUnit_Framework_TestCase
6
{
7
    private static $value = 'føøbarbaz';
8
9
    /**
10
     * @var Base64
11
     */
12
    private $defaultEncoding;
13
14
    /**
15
     * @var Base64
16
     */
17
    private $nonDefaultEncoding;
18
19
    public function setUp()
20
    {
21
        $this->defaultEncoding    = new Base64();
22
        $this->nonDefaultEncoding = new Base64(false, false);
23
    }
24
25
    public function testEncode()
26
    {
27
        $this->assertSame('ZsO4w7hiYXJiYXo', $this->defaultEncoding->encode(self::$value));
28
        $this->assertSame('ZsO4w7hiYXJiYXo=', $this->nonDefaultEncoding->encode(self::$value));
29
    }
30
31
    public function testDecode()
32
    {
33
        $this->assertSame(self::$value, $this->defaultEncoding->decode('ZsO4w7hiYXJiYXo'));
34
        $this->assertSame(self::$value, $this->nonDefaultEncoding->decode('ZsO4w7hiYXJiYXo='));
35
    }
36
}
37