Skip to content

Commit

Permalink
adds missed test
Browse files Browse the repository at this point in the history
  • Loading branch information
nixilla committed Jun 21, 2018
1 parent cff3664 commit 03651e2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/Proxy/Twilio/CurlClientSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace spec\Nixilla\Api\LoggerBundle\Proxy\Twilio;

use Nixilla\Api\LoggerBundle\Logger\ApiInterface;
use Nixilla\Api\LoggerBundle\Proxy\Twilio\CurlClient;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -12,4 +13,23 @@ function it_is_initializable()
{
$this->shouldHaveType(CurlClient::class);
}

function it_monitors_http_requests(ApiInterface $logger)
{
$this->setLogger($logger);

$logger->logCall(
Argument::any(),
Argument::any(),
Argument::any(),
Argument::any(),
Argument::any(),
Argument::any(),
Argument::any(),
Argument::any()
)->shouldBeCalled()
;

$this->request('GET', 'http://packagist.org', [], [], ['Content-Type' => 'text/plain'])->shouldNotReturn(null);
}
}

0 comments on commit 03651e2

Please sign in to comment.