Skip to content

Commit 724f097

Browse files
committed
Start enhancing CURLRequest testing
1 parent f74f1a6 commit 724f097

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

system/HTTP/CURLRequest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php namespace CodeIgniter\HTTP;
1+
<?php
2+
namespace CodeIgniter\HTTP;
23

34
/**
45
* CodeIgniter
@@ -114,7 +115,10 @@ public function __construct(App $config, URI $uri, ResponseInterface $response =
114115
{
115116
if ( ! function_exists('curl_version'))
116117
{
118+
// we won't see this during travis-CI
119+
// @codeCoverageIgnoreStart
117120
throw HTTPException::forMissingCurl();
121+
// @codeCoverageIgnoreEnd
118122
}
119123

120124
parent::__construct($config);
@@ -571,7 +575,7 @@ protected function setCURLOptions(array $curl_options = [], array $config = [])
571575
$cert = $cert[0];
572576
}
573577

574-
if (! file_exists($cert))
578+
if ( ! file_exists($cert))
575579
{
576580
throw HTTPException::forSSLCertNotFound($cert);
577581
}
@@ -586,7 +590,7 @@ protected function setCURLOptions(array $curl_options = [], array $config = [])
586590
{
587591
$file = realpath($config['ssl_key']);
588592

589-
if (! $file)
593+
if ( ! $file)
590594
{
591595
throw HTTPException::forInvalidSSLKey($config['ssl_key']);
592596
}
@@ -723,6 +727,8 @@ protected function setCURLOptions(array $curl_options = [], array $config = [])
723727
* Does the actual work of initializing cURL, setting the options,
724728
* and grabbing the output.
725729
*
730+
* @codeCoverageIgnore
731+
*
726732
* @param array $curl_options
727733
*
728734
* @return string

0 commit comments

Comments
 (0)