Passed
Push — master ( 93ae1f...c8123d )
by TQ
04:05
created

SignatureTest::testGetBodySignature()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 2
b 0
f 0
1
<?php
2
namespace Upyun\Tests;
3
4
use Upyun\Signature;
5
use Upyun\Config;
6
use PHPUnit\Framework\TestCase;
7
8
class SignatureTest extends TestCase
9
{
10
11
    /**
12
     * @var Config;
13
     */
14
    public $config;
15
16
    public function setUp(): void
17
    {
18
        $this->config = new Config('bucket', 'operator', 'password');
19
    }
20
21
    public function testGetBodySignature()
22
    {
23
        $sign = Signature::getBodySignature($this->config, 'POST', '/bucket');
24
        $this->assertEquals($sign, 'UPYUN operator:Xx3G6+DAvUyCL2Y2npSW/giTFI8=');
25
    }
26
}
27