| 1 | <?php |
||
| 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 |