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

ClientTest::testFileDownload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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