Completed
Push — master ( 8f9aa7...c95d63 )
by Derek
02:17
created

HttpReaderSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 42
rs 10
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
/*
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