Completed
Push — master ( 5516e9...f0e0a7 )
by Koen
01:45
created

ClientTest::testComics()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Ikoene\MarvelApiBundle\Tests\Controller;
4
5
use Ikoene\MarvelApiBundle\Controller\Client;
6
use PHPUnit\Framework\TestCase;
7
8
class ClientTest extends TestCase
9
{
10
    /**
11
     * @var Client
12
     */
13
    protected $client;
14
15
    protected function setUp()
16
    {
17
        $this->client = new Client(getenv('PUBLIC_API_KEY'), getenv('PRIVATE_API_KEY'));
18
    }
19
20
    function testCharacters()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
21
    {
22
        $response = $this->client->getCharacters();
23
24
        $this->assertInstanceOf(
25
            'Ikoene\MarvelApiBundle\DataWrapper\CharacterDataWrapper',
26
            $response
27
        );
28
    }
29
30
    function testComics()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
31
    {
32
        $response = $this->client->getComics();
33
34
        $this->assertInstanceOf(
35
            'Ikoene\MarvelApiBundle\DataWrapper\ComicDataWrapper',
36
            $response
37
        );
38
    }
39
40
    function testEvents()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
41
    {
42
        $response = $this->client->getEvents();
43
44
        $this->assertInstanceOf(
45
            'Ikoene\MarvelApiBundle\DataWrapper\EventDataWrapper',
46
            $response
47
        );
48
    }
49
50
    function testCreators()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
51
    {
52
        $response = $this->client->getCreators();
53
54
        $this->assertInstanceOf(
55
            'Ikoene\MarvelApiBundle\DataWrapper\CreatorDataWrapper',
56
            $response
57
        );
58
    }
59
60
    function testStories()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
61
    {
62
        $response = $this->client->getStories();
63
64
        $this->assertInstanceOf(
65
            'Ikoene\MarvelApiBundle\DataWrapper\StoryDataWrapper',
66
            $response
67
        );
68
    }
69
70
    function testSeries()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
71
    {
72
        $response = $this->client->getSeries();
73
74
        $this->assertInstanceOf(
75
            'Ikoene\MarvelApiBundle\DataWrapper\SeriesDataWrapper',
76
            $response
77
        );
78
    }
79
}
80