Skip to content

Commit

Permalink
Skip tests when curl is missing & suggest it in composer.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 16, 2018
1 parent 1623fb5 commit 0c8b86b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -38,6 +38,7 @@
},
"suggest": {
"ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.",
"ext-curl": "To enable more efficient network calls in Http\\Client.",
"lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()"
},
"require-dev": {
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/Http/Client/Adapter/CurlTest.php
Expand Up @@ -27,6 +27,8 @@ class CurlTest extends TestCase
public function setUp()
{
parent::setUp();
$this->skipIf(!extension_exists('curl'), 'Skipping as ext/curl is not installed.');

$this->curl = new Curl();
$this->caFile = CORE_PATH . 'config' . DIRECTORY_SEPARATOR . 'cacert.pem';
}
Expand Down

0 comments on commit 0c8b86b

Please sign in to comment.