Completed
Pull Request — develop (#14)
by Rimas
03:51
created

SealTest::getDocumentParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
dl 11
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
namespace Isign\Tests\Integration;
3
4
use Isign\ResultInterface;
5
use Isign\Document;
6
7
class SealTest extends TestCase
8
{
9 View Code Duplication
    public function testSign()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
    {
11
        /** @var Isign\Document\SealResult $result */
12
        $result = $this->client->get(new Document\Seal(
13
            'pdf',
14
            $this->getDocumentParams(),
15
            false
16
        ));
17
18
        $this->assertSame(ResultInterface::STATUS_OK, $result->getStatus());
19
        $this->assertSame('Signature1', $result->getSignatureId());
20
        $this->assertNotEmpty($result->getFile());
21
22
        return $result;
23
    }
24
25 View Code Duplication
    private function getDocumentParams()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
26
    {
27
        return [
28
            'contact' => 'Ponas Testuotojas',
29
            'reason' => 'Elektroninis spaudas',
30
            'location' => 'Vilnius',
31
            'files' => [
32
               __DIR__ . '/../data/document.pdf',
33
            ]
34
        ];
35
    }
36
}
37