diff --git a/.travis.yml b/.travis.yml index ed44ad0..97254a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: php php: - 7.2 + - 7.3 env: global: diff --git a/README.md b/README.md index dac3e0b..1538867 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,4 @@ services: arguments: [ "%twilio.username%", "%twilio.password%", ~, ~, '@twilio.http.client'] ``` + diff --git a/composer.json b/composer.json index 4589f2e..6abdd52 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": ">=5.6", - "symfony/framework-bundle": "~2.3||~3", + "symfony/framework-bundle": "~2.3||~3||~4", "twig/twig": "~1.24||~2", "kriswallsmith/buzz": "<0.16" }, @@ -29,7 +29,7 @@ "sebastian/phpcpd": "^4.0", "leanphp/phpspec-code-coverage": "^4.2", "php-coveralls/php-coveralls": "^2.1", - "symfony/expression-language": "~2.3||~3", + "symfony/expression-language": "~2.3||~3||~4", "twilio/sdk": "^5.19" }, "autoload": { diff --git a/spec/Proxy/Twilio/CurlClientSpec.php b/spec/Proxy/Twilio/CurlClientSpec.php index 4192c73..48bc69d 100644 --- a/spec/Proxy/Twilio/CurlClientSpec.php +++ b/spec/Proxy/Twilio/CurlClientSpec.php @@ -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; @@ -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); + } }