SignatureTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetBodySignature() 0 5 1
1
<?php
2
namespace Upyun\Tests;
3
4
use Upyun\Signature;
5
use Upyun\Config;
6
7
class SignatureTest extends \PHPUnit_Framework_TestCase
8
{
9
10
    /**
11
     * @var Config;
12
     */
13
    public $config;
14
15
    public function setUp()
16
    {
17
        $this->config = new Config('bucket', 'operator', 'password');
18
    }
19
20
    public function testGetBodySignature()
21
    {
22
        $sign = Signature::getBodySignature($this->config, 'POST', '/bucket');
23
        $this->assertEquals($sign, 'UPYUN operator:Xx3G6+DAvUyCL2Y2npSW/giTFI8=');
24
    }
25
}
26