@@ 41-52 (lines=12) @@ | ||
38 | $this->assertTrue($returnedData == 'someData'); |
|
39 | } |
|
40 | ||
41 | private function libCurlReturnData() |
|
42 | { |
|
43 | $libCurl = $this->prophesize('Ip2c\Curl\LibCurl'); |
|
44 | ||
45 | $libCurl->init(Argument::any())->willReturn(null); |
|
46 | $libCurl->setOpt(Argument::any(), Argument::any(), Argument::any())->willReturn(null); |
|
47 | $libCurl->exec(Argument::any())->willReturn('someData'); |
|
48 | $libCurl->errno(Argument::any())->willReturn(0); |
|
49 | $libCurl->close(Argument::any())->willReturn(null); |
|
50 | ||
51 | return $libCurl->reveal(); |
|
52 | } |
|
53 | ||
54 | private function libCurlReturnsNothing() |
|
55 | { |
|
@@ 54-66 (lines=13) @@ | ||
51 | return $libCurl->reveal(); |
|
52 | } |
|
53 | ||
54 | private function libCurlReturnsNothing() |
|
55 | { |
|
56 | $libCurl = $this->prophesize('Ip2c\Curl\LibCurl'); |
|
57 | ||
58 | $libCurl->init(Argument::any())->willReturn(null); |
|
59 | $libCurl->setOpt(Argument::any(), Argument::any(), Argument::any())->willReturn(null); |
|
60 | $libCurl->exec(Argument::any())->willReturn(''); |
|
61 | $libCurl->errno(Argument::any())->willReturn(1); |
|
62 | $libCurl->error(Argument::any())->willReturn('error'); |
|
63 | $libCurl->close(Argument::any())->willReturn(null); |
|
64 | ||
65 | return $libCurl->reveal(); |
|
66 | } |
|
67 | } |
|
68 |