Passed
Push — master ( 8f9c8a...a42d4d )
by Ross
02:45
created

ZoneInfoTest::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
/**
3
 *
4
 * Copyright (C) 2018  Ross Mitchell
5
 *
6
 * This file is part of RossMitchell/UpdateCloudFlare.
7
 *
8
 * RossMitchell/UpdateCloudFlare is free software: you can redistribute
9
 * it and/or modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation, either version 3 of the
11
 * License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
namespace RossMitchell\UpdateCloudFlare\Tests\Requests;
23
24
use RossMitchell\UpdateCloudFlare\Interfaces\RequestInterface;
25
use RossMitchell\UpdateCloudFlare\Requests\ZoneInfo;
26
use RossMitchell\UpdateCloudFlare\Tests\AbstractTestClass;
27
28
/**
29
 * Class ZoneInfoTest
30
 * @testdox RossMitchell\UpdateCloudFlare\Requests\ZoneInfo
31
 * @package RossMitchell\UpdateCloudFlare\Tests\Requests
32
 */
33
class ZoneInfoTest extends AbstractRequest
34
{
35
    /**
36
     * @Inject
37
     * @var ZoneInfo
38
     */
39
    private $zoneInfo;
40
41
    /**
42
     * @return mixed
43
     */
44
    public function getRequest()
45
    {
46
        return $this->zoneInfo;
47
    }
48
49
    /**
50
     * @return array
51
     */
52
    public function getHeaders(): array
53
    {
54
        return [
55
            'X-Auth-Email: [email protected]',
56
            'X-Auth-Key: 123456789',
57
            'Content-Type: application/json',
58
        ];
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getRequestType(): string
65
    {
66
        return 'GET';
67
    }
68
69
    /**
70
     * @return array
71
     */
72
    public function getFields(): array
73
    {
74
        return [];
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getUrl(): string
81
    {
82
        return 'https://api.cloudflare.com/client/v4/zones?name=example.com';
83
    }
84
}
85