GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 579a75...556562 )
by Casper
03:43 queued 01:48
created

FilesTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testStore() 0 14 1
A testStoreWithPath() 0 16 1
1
<?php
2
3
namespace NStack\Tests;
4
5
use DateTime;
6
use NStack\Clients\FilesClient;
7
use NStack\Models\File;
8
9
class FilesTest extends TestCase
10
{
11
    public function testStore()
12
    {
13
        $client = $this->getClientWithMockedPost('files-store.json');
14
15
        $client = new FilesClient($this->getConfig(), $client);
16
        $entry = $client->store(
17
            'test',
18
            'private-password',
19
            __DIR__ . '/mocks/test.jpg',
20
            ['test', 'tag'],
21
            new DateTime()
22
        );
23
24
        $this->assertInstanceOf(File::class, $entry);
25
    }
26
27
    public function testStoreWithPath()
28
    {
29
        $client = $this->getClientWithMockedPost('files-store-with-path.json');
30
31
        $client = new FilesClient($this->getConfig(), $client);
32
        $entry = $client->storeWithPath(
33
            'test',
34
            'private-password',
35
            'appId',
36
            'image/jpeg',
37
            16980,
38
            ['test', 'tag'],
39
            new DateTime()
40
        );
41
42
        $this->assertInstanceOf(File::class, $entry);
43
    }
44
}
45