Completed
Push — master ( 64e8ff...9df0db )
by Derek
02:02
created

HttpReaderSpec::it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace spec\Subreality\Dilmun\Anshar;
3
4
use Subreality\Dilmun\Anshar\HttpReader;
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use Subreality\Dilmun\Nabu\Logger;
8
9
class HttpReaderSpec extends ObjectBehavior
10
{
11
    function let()
12
    {
13
        $this->beConstructedWith("https://www.google.com");
14
    }
15
16
    function it_is_initializable()
17
    {
18
        $this->shouldHaveType(HttpReader::class);
19
    }
20
21
    function it_retrieves_http_response_codes()
22
    {
23
        $this->getResponseCode()->shouldReturn("200");
24
    }
25
26
    function it_provides_access_to_its_url()
27
    {
28
        $this->getUrl()->shouldReturn("https://www.google.com");
29
    }
30
/*
0 ignored issues
show
Unused Code Comprehensibility introduced by
61% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
31
    function it_retrieves_the_url_contents()
32
    {
33
        $this->getContents()->shouldReturnAnInstanceOf('\DOMDocument');
34
    }
35
36
    function it_sets_a_logger(Logger $logger)
37
    {
38
        $this->setLogger($logger);
39
40
        $this->getLogger()->shouldReturn($logger);
41
    }
42
43
    function it_updates_a_log(Logger $logger)
44
    {
45
        $logger->info("Getting response code")->shouldBeCalled();
46
47
        $this->getResponseCode();
48
    }
49
*/
50
}
51