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 ( c42cfc...29c08b )
by Casper
04:31 queued 02:06
created

LanguageTest::testLanguagesBestFit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace NStack\Tests;
4
5
use NStack\Clients\LanguagesClient;
6
use NStack\Clients\LocalizeClient;
7
use NStack\Models\Language;
8
9
class LanguageTest extends TestCase
10
{
11
    public function testResourceIndex()
12
    {
13
        $client = $this->getClientWithMockedGet('languages-index.json');
14
15
        $client = new LanguagesClient($this->getConfig(), $client);
16
        $list = $client->index();
17
18
        foreach ($list as $language) {
19
            $this->assertInstanceOf(Language::class, $language);
20
        }
21
    }
22
23
    public function testResourceSearch()
24
    {
25
        $client = $this->getClientWithMockedGet('languages-search.json');
26
27
        $client = new LanguagesClient($this->getConfig(), $client);
28
        $list = $client->search("br");
29
30
        foreach ($list as $language) {
31
            $this->assertInstanceOf(Language::class, $language);
32
        }
33
    }
34
35
    public function testLanguagesIndex()
36
    {
37
        $client = $this->getClientWithMockedGet('localize-languages-index.json');
38
39
        $client = new LocalizeClient($this->getConfig(), $client);
40
        $list = $client->indexLanguage('mobile');
41
42
        foreach ($list as $continent) {
43
            $this->assertInstanceOf(Language::class, $continent);
44
        }
45
    }
46
47
    public function testLanguagesBestFit()
48
    {
49
        $client = $this->getClientWithMockedGet('localize-languages-best-fit.json');
50
51
        $client = new LocalizeClient($this->getConfig(), $client);
52
        $language = $client->bestFitLanguage('mobile');
53
54
        $this->assertInstanceOf(Language::class, $language);
55
    }
56
}
57