Passed
Push — master ( 941e97...ba9899 )
by Ross
02:32
created

HeadersTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A willReturnValidHeaders() 0 10 1
1
<?php
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\Data;
23
24
use RossMitchell\UpdateCloudFlare\Data\Headers;
25
use RossMitchell\UpdateCloudFlare\Tests\AbstractTestClass;
26
27
/**
28
 * Class HeadersTest
29
 * @testdox RossMitchell\UpdateCloudFlare\Data\Headers
30
 * @package RossMitchell\UpdateCloudFlare\Tests\Data
31
 */
32
class HeadersTest extends AbstractTestClass
33
{
34
    /**
35
     * @Inject
36
     * @var Headers
37
     */
38
    private $headers;
39
40
    /**
41
     * @test
42
     */
43
    public function willReturnValidHeaders()
44
    {
45
        $headers         = $this->headers;
46
        $expectedHeaders = [
47
            'X-Auth-Email: [email protected]',
48
            'X-Auth-Key: 123456789',
49
            'Content-Type: application/json',
50
        ];
51
52
        $this->assertEquals($expectedHeaders, $headers->getHeadersArray());
53
    }
54
}
55