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.
Failed Conditions
Branch master (37a03c)
by Casper
02:30
created

LocalizeLanguagesTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testLanguagesIndex() 0 9 2
A testLanguagesBestFit() 0 8 1
1
<?php
2
3
namespace NStack\Tests;
4
5
use NStack\Clients\LocalizeClient;
6
use NStack\Clients\LocalizeLanguagesClient;
7
use NStack\Models\Language;
8
use NStack\Models\Resource;
9
10
class LocalizeLanguagesTest extends TestCase
11
{
12
13
    public function testLanguagesIndex()
14
    {
15
        $client = $this->getClientWithMockedGet('localize-languages-index.json');
16
17
        $client = new LocalizeLanguagesClient($this->getConfig(), $client);
18
        $list = $client->index('mobile');
19
20
        foreach ($list as $continent) {
21
            $this->assertInstanceOf(Language::class, $continent);
22
        }
23
    }
24
25
    public function testLanguagesBestFit()
26
    {
27
        $client = $this->getClientWithMockedGet('localize-languages-best-fit.json');
28
29
        $client = new LocalizeLanguagesClient($this->getConfig(), $client);
30
        $language = $client->bestFit('mobile');
31
32
        $this->assertInstanceOf(Language::class, $language);
33
    }
34
}
35