Passed
Branch develop (84afed)
by Paulius
02:35
created

ClientTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFileDownload() 0 7 1
1
<?php
2
namespace Dokobit\Gateway\Tests\Integration;
3
4
class ClientTest extends TestCase
5
{
6
    const TEST_FILE_URL = 'https://developers.dokobit.com/sc/test.pdf';
7
8
    public function testFileDownload()
9
    {
10
        $path = tempnam(sys_get_temp_dir(), 'TEST');
11
        $this->assertStringEqualsFile($path, '', 'Test file must be empty before download!');
12
13
        $this->client->downloadFile(self::TEST_FILE_URL, $path);
14
        $this->assertStringNotEqualsFile($path, '', 'Test file must not be empty after download!');
15
    }
16
}
17