SignatureTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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