Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote branch 'origin/master'

  • Loading branch information...
commit e01ad0fa0bf4994540dbadfe7658fc2b31e41a25 2 parents 71f1ac6 + 385942a
@sbisbee authored
View
31 CHANGELOG
@@ -8,21 +8,34 @@ New Features
* The HTTP socket code was abstracted out of the core Sag class into its own
HTTP module. It is called SagNativeHTTPAdapter and remains the default
- transport mechanism. This allows for additional drivers to be written that
- leverage other underlying systems, potentially adding extra functionality.
- The SagNativeHTTPAdapter is referenced by the Sag::$NATIVE_HTTP_ADAPTER
- static public variable and can be specified with the setHTTPAdapter()
- function.
+ transport mechanism. This allows for drivers to be written that leverage
+ different HTTP libraries, potentially adding extra functionality. The
+ SagNativeHTTPAdapter is referenced by the Sag::$HTTP_NATIVE_SOCKETS static
+ public variable and can be specified with the setHTTPAdapter() function.
+ (closes #12)
- * cURL support was added with the SagCURLHTTPAdapter. If your system has the
- cURL PHP extension installed then you tell Sag to leverage cURL by calling
- `$sag->setHTTPAdapter(Sag::$CURL_HTTP_ADAPTER)`.
+ * cURL can now be used when communicating with CouchDB, allowing for
+ additional functionality. If your system has the cURL PHP extension
+ installed then you can tell Sag to use it by calling
+ `$sag->setHTTPAdapter(Sag::$HTTP_CURL);`.
* SSL is now supported if you use cURL instead of native sockets. This
introduces setSSL() to turn SSL on/off, and setSSLCert() to specify a
certificate file to verify against. Verification is only supported if you
provide a certificate with setSSLCert(). HTTP libraries that do not support
- SSL (native sockets) will throw a SagException.
+ SSL (ie., native sockets) will throw a SagException if you call an SSL
+ function.
+
+ * You can now tell getAllDocs() to sort in descending order. Thanks to cygal
+ (github/cygal) for the patch and pull request. (closes #31)
+
+Fixed Bugs
+
+ * If you set the database name and then set it again with the same value, but
+ also specify to create the database if it doesn't exist, Sag was previously
+ not checking to see if it should create the database. This is not fixed:
+ even if you specify the currentDatabase() value as the name the check will
+ still run. (closes #33)
Version 0.6.1
-------------
View
99 src/Sag.php
@@ -38,8 +38,8 @@ class Sag {
*/
public static $AUTH_COOKIE = "AUTH_COOKIE";
- public static $NATIVE_HTTP_ADAPTER = 'NATIVE_HTTP_ADAPTER';
- public static $CURL_HTTP_ADAPTER = 'CURL_HTTP_ADAPTER';
+ public static $HTTP_NATIVE_SOCKETS = 'HTTP_NATIVE_SOCKETS';
+ public static $HTTP_CURL = 'HTTP_CURL';
private $db; //Database name to hit.
private $host; //IP or address to connect to.
@@ -50,10 +50,6 @@ class Sag {
private $authType; //One of the Sag::$AUTH_* variables
private $authSession; //AuthSession cookie value from/for CouchDB
- private $socketOpenTimeout; //The seconds until socket connection timeout
- private $socketRWTimeoutSeconds; //The seconds for socket I/O timeout
- private $socketRWTimeoutMicroseconds; //The microseconds for socket I/O timeout
-
private $cache;
private $staleDefault; //Whether or not to use ?stale=ok on all design doc calls
@@ -81,27 +77,39 @@ public function __construct($host = "127.0.0.1", $port = "5984")
$this->setHTTPAdapter();
}
+ /**
+ * Set which HTTP library you want to use for communicating with CouchDB.
+ *
+ * @param string $type The type of adapter you want to use. Should be one of
+ * the Sag::$HTTP_* variables.
+ * @return Sag Returns $this.
+ *
+ * @see Sag::$HTTP_NATIVE_SOCKETS
+ * @see Sag::$HTTP_CURL
+ */
public function setHTTPAdapter($type = null) {
if(!$type) {
- $type = self::$NATIVE_HTTP_ADAPTER;
+ $type = self::$HTTP_NATIVE_SOCKETS;
}
- //nothing to be done
+ // nothing to be done
if($type === $this->httpAdapterType) {
return true;
}
- //remember what was already set (ie., might have called decode() already)
+ // remember what was already set (ie., might have called decode() already)
if($this->httpAdapter) {
$prevDecode = $this->httpAdapter->decodeResp;
+ $prevTimeouts = $this->httpAdapter->getTimeouts();
}
+ // the glue
switch($type) {
- case self::$NATIVE_HTTP_ADAPTER:
+ case self::$HTTP_NATIVE_SOCKETS:
$this->httpAdapter = new SagNativeHTTPAdapter($this->host, $this->port);
break;
- case self::$CURL_HTTP_ADAPTER:
+ case self::$HTTP_CURL:
$this->httpAdapter = new SagCURLHTTPAdapter($this->host, $this->port);
break;
@@ -109,14 +117,32 @@ public function setHTTPAdapter($type = null) {
throw SagException("Invalid Sag HTTP adapter specified: $type");
}
- if($prevDecode) {
+ // restore previous decode value, if any
+ if(is_bool($prevDecode)) {
$this->httpAdapter->decodeResp = $prevDecode;
}
+ // restore previous timeout vlaues, if any
+ if(is_array($prevTimeouts)) {
+ $this->httpAdapter->setTimeoutsFromArray($prevTimeouts);
+ }
+
+ $this->httpAdapterType = $type;
+
return $this;
}
/**
+ * Returns the current HTTP adapter being used.
+ *
+ * @return string Will be equal to Sag::$HTTP_NATIVE_SOCKETS or
+ * Sag::$HTTP_CURL.
+ */
+ public function currentHTTPAdapter() {
+ return $this->httpAdapterType;
+ }
+
+ /**
* Updates the login credentials in Sag that will be used for all further
* communications. Pass null to both $user and $pass to turn off
* authentication, as Sag does support blank usernames and passwords - only
@@ -489,7 +515,7 @@ public function copy($srcID, $dstID, $dstRev = null) {
* @return Sag Returns $this. Throws on failure.
*/
public function setDatabase($db, $createIfNotFound = false) {
- if($this->db != $db) {
+ if($this->db != $db || $createIfNotFound) {
if(!is_string($db)) {
throw new SagException('setDatabase() expected a string.');
}
@@ -528,10 +554,12 @@ public function setDatabase($db, $createIfNotFound = false) {
* @param string $endKey The endkey variable (valid JSON). Defaults to null.
* @param array $keys An array of keys (strings) of the specific documents
* you're trying to get.
+ * @param bool $descending Whether to sort the results in descending order or
+ * not.
*
* @return mixed
*/
- public function getAllDocs($incDocs = false, $limit = null, $startKey = null, $endKey = null, $keys = null) {
+ public function getAllDocs($incDocs = false, $limit = null, $startKey = null, $endKey = null, $keys = null, $descending = false) {
if(!$this->db) {
throw new SagException('No database specified.');
}
@@ -570,6 +598,14 @@ public function getAllDocs($incDocs = false, $limit = null, $startKey = null, $e
$qry[] = 'limit='.urlencode($limit);
}
+ if($descending !== false) {
+ if(!is_bool($descending)) {
+ throw new SagException('getAllDocs() expected a boolean for descending.');
+ }
+
+ $qry[] = "descending=true";
+ }
+
$qry = '?'.implode('&', $qry);
if(isset($keys))
@@ -766,26 +802,22 @@ public function setAttachment($name, $data, $contentType, $docID, $rev = null) {
}
/**
- * Sets the connection timeout on the socket. See setOpenTimeout() for
- * settings the read/write timeout.
+ * Sets how long Sag should wait to establish a connection to CouchDB.
*
* @param int $seconds
* @return Sag Returns $this.
*/
public function setOpenTimeout($seconds) {
- if(!is_int($seconds) || $seconds < 1) {
- throw new Exception('setOpenTimeout() expects a positive integer.');
- }
-
- $this->socketOpenTimeout = $seconds;
+ //the adapter will take care of the validation for us
+ $this->httpAdapter->setOpenTimeout($seconds);
return $this;
}
/**
- * Sets the read/write timeout period on the socket to the sum of seconds and
- * microseconds. If not set, then the default_socket_timeout setting is used
- * from your php.ini config.
+ * How long Sag should wait to execute a request with CouchDB. If not set,
+ * then either default_socket_timeout from your php.ini or cURL's defaults
+ * are used depending on which adapter you're using.
*
* Use setOpenTimeout() to set the timeout on opening the socket.
*
@@ -794,24 +826,7 @@ public function setOpenTimeout($seconds) {
* @return Sag Returns $this.
*/
public function setRWTimeout($seconds, $microseconds = 0) {
- if(!is_int($microseconds) || $microseconds < 0) {
- throw new SagException('setRWTimeout() expects $microseconds to be an integer >= 0.');
- }
-
- //TODO make this better, including checking $microseconds
- //$seconds can be 0 if $microseconds > 0
- if(
- !is_int($seconds) ||
- (
- (!$microseconds && $seconds < 1) ||
- ($microseconds && $seconds < 0)
- )
- ) {
- throw new SagException('setRWTimeout() expects $seconds to be a positive integer.');
- }
-
- $this->socketRWTimeoutSeconds = $seconds;
- $this->socketRWTimeoutMicroseconds = $microseconds;
+ $this->httpAdapter->setRWTimeout($seconds, $microseconds);
return $this;
}
View
37 src/httpAdapters/SagCURLHTTPAdapter.php
@@ -11,6 +11,10 @@ class SagCURLHTTPAdapter extends SagHTTPAdapter {
private $ch;
public function __construct($host, $port) {
+ if(!extension_loaded('curl')) {
+ throw new SagException('Sag cannot use cURL on this system: the PHP cURL extension is not installed.');
+ }
+
parent::__construct($host, $port);
$this->ch = curl_init();
@@ -29,24 +33,39 @@ public function procPacket($method, $url, $data = null, $headers = array()) {
);
// cURL wants the headers as an array of strings, not an assoc array
- if(sizeof($headers) > 0) {
- $curlHeaders = array();
+ if(is_array($headers) && sizeof($headers) > 0) {
+ $opts[CURLOPT_HTTPHEADER] = array();
foreach($headers as $k => $v) {
- $curlHeaders[] = "$k: $v";
+ $opts[CURLOPT_HTTPHEADER][] = "$k: $v";
}
-
- $opts[CURLOPT_HTTPHEADER] = $curlHeaders;
}
+ // send data through cURL's poorly named opt
if($data) {
$opts[CURLOPT_POSTFIELDS] = $data;
}
+ // special considerations for HEAD requests
if($method == 'HEAD') {
$opts[CURLOPT_NOBODY] = true;
}
+ // connect timeout
+ if(is_int($this->socketOpenTimeout)) {
+ $opts[CURLOPT_CONNECTTIMEOUT] = $this->socketOpenTimeout;
+ }
+
+ // exec timeout (seconds)
+ if(is_int($this->socketRWTimeoutSeconds)) {
+ $opts[CURLOPT_TIMEOUT] = $this->socketRWTimeoutSeconds;
+ }
+
+ // exec timeout (ms)
+ if(is_int($this->socketRWTimeoutMicroseconds)) {
+ $opts[CURLOPT_TIMEOUT_MS] = $this->socketRWTimeoutMicroseconds;
+ }
+
// SSL support: don't verify unless we have a cert set
if($this->proto === 'https') {
if(!$this->sslCertPath) {
@@ -64,20 +83,20 @@ public function procPacket($method, $url, $data = null, $headers = array()) {
$chResponse = curl_exec($this->ch);
if($chResponse !== false) {
- //prepare the response object
+ // prepare the response object
$response = new stdClass();
$response->headers = new stdClass();
$response->headers->_HTTP = new stdClass();
$response->body = '';
- //split headers and body
+ // split headers and body
list($headers, $response->body) = explode("\r\n\r\n", $chResponse);
- //split up the headers
+ // split up the headers
$headers = explode("\r\n", $headers);
for($i = 0; $i < sizeof($headers); $i++) {
- //first element will always be the HTTP status line
+ // first element will always be the HTTP status line
if($i === 0) {
$response->headers->_HTTP->raw = $headers[$i];
View
94 src/httpAdapters/SagHTTPAdapter.php
@@ -12,9 +12,14 @@
protected $host;
protected $port;
+
protected $proto = 'http'; //http or https
protected $sslCertPath;
+ protected $socketOpenTimeout; //The seconds until socket connection timeout
+ protected $socketRWTimeoutSeconds; //The seconds for socket I/O timeout
+ protected $socketRWTimeoutMicroseconds; //The microseconds for socket I/O timeout
+
public function __construct($host = "127.0.0.1", $port = "5984") {
$this->host = $host;
$this->port = $port;
@@ -108,5 +113,94 @@ public function setSSLCert($path) {
public function usingSSL() {
return $this->proto === 'https';
}
+
+ /**
+ * Sets how long Sag should wait to establish a connection to CouchDB.
+ *
+ * @param int $seconds
+ */
+ public function setOpenTimeout($seconds) {
+ if(!is_int($seconds) || $seconds < 1) {
+ throw new SagException('setOpenTimeout() expects a positive integer.');
+ }
+
+ $this->socketOpenTimeout = $seconds;
+ }
+
+ /**
+ * Set how long we should wait for an HTTP request to be executed.
+ *
+ * @param int $seconds The number of seconds.
+ * @param int $microseconds The number of microseconds.
+ */
+ public function setRWTimeout($seconds, $microseconds) {
+ if(!is_int($microseconds) || $microseconds < 0) {
+ throw new SagException('setRWTimeout() expects $microseconds to be an integer >= 0.');
+ }
+
+ //TODO make this better, including checking $microseconds
+ //$seconds can be 0 if $microseconds > 0
+ if(
+ !is_int($seconds) ||
+ (
+ (!$microseconds && $seconds < 1) ||
+ ($microseconds && $seconds < 0)
+ )
+ ) {
+ throw new SagException('setRWTimeout() expects $seconds to be a positive integer.');
+ }
+
+ $this->socketRWTimeoutSeconds = $seconds;
+ $this->socketRWTimeoutMicroseconds = $microseconds;
+ }
+
+ /**
+ * Returns an associative array of the currently set timeout values.
+ *
+ * @return array An associative array with the keys 'open', 'rwSeconds', and
+ * 'rwMicroseconds'.
+ *
+ * @see setTimeoutsFromArray()
+ */
+ public function getTimeouts() {
+ return array(
+ 'open' => $this->socketOpenTimeout,
+ 'rwSeconds' => $this->socketRWTimeoutSeconds,
+ 'rwMicroseconds' => $this->socketRWTimeoutMicroseconds
+ );
+ }
+
+ /**
+ * A utility function that sets the different timeout values based on an
+ * associative array.
+ *
+ * @param array $arr An associative array with the keys 'open', 'rwSeconds',
+ * and 'rwMicroseconds'.
+ *
+ * @see getTimeouts()
+ */
+ public function setTimeoutsFromArray($arr) {
+ /*
+ * Validation is lax in here because this should only ever be used with
+ * getTimeouts() return values. If people are using it by hand then there
+ * might be something wrong with the API.
+ */
+ if(!is_array($arr)) {
+ throw SagException('Expected an array and got something else.');
+ }
+
+ if(is_int($arr['open'])) {
+ $this->setOpenTimeout($arr['open']);
+ }
+
+ if(is_int($arr['rwSeconds'])) {
+ if(is_int($arr['rwMicroseconds'])) {
+ $this->setRWTimeout($arr['rwSeconds'], $arr['rwMicroseconds']);
+ }
+ else {
+ $this->setRWTimeout($arr['rwSeconds']);
+ }
+ }
+ }
}
?>
View
13 src/httpAdapters/SagNativeHTTPAdapter.php
@@ -26,14 +26,14 @@ public function __destruct()
* Native sockets does not support SSL.
*/
public function useSSL($use) {
- throw new SagException('Sag::$NATIVE_HTTP_ADAPTER does not support SSL.');
+ throw new SagException('Sag::$HTTP_NATIVE_SOCKETS does not support SSL.');
}
/**
* Native sockets does not support SSL.
*/
public function setSSLCert($path) {
- throw new SagException('Sag::$NATIVE_HTTP_ADAPTER does not support SSL.');
+ throw new SagException('Sag::$HTTP_NATIVE_SOCKETS does not support SSL.');
}
public function procPacket($method, $url, $data = null, $headers = array()) {
@@ -75,13 +75,18 @@ public function procPacket($method, $url, $data = null, $headers = array()) {
$sock = fsockopen($this->host, $this->port, $sockErrNo, $sockErrStr);
}
- //some PHP configurations don't throw when fsockopen() fails
+ /*
+ * Some PHP configurations don't throw when fsockopen() fails, so we
+ * will try to do it for them. We are using an Exception instead of a
+ * SagException so that the catch-block grabs it and formats the
+ * message.
+ */
if(!$sock) {
throw new Exception($sockErrStr, $sockErrNo);
}
}
catch(Exception $e) {
- throw new SagException('Was unable to fsockopen() a new socket: '.$e->getMessage());
+ throw new SagException('Was unable to fsockopen() a new socket: ' . $e->getMessage());
}
}
}
View
194 tests/SagTest.php
@@ -26,6 +26,8 @@ class SagTest extends PHPUnit_Framework_TestCase
protected $couchDBName;
protected $couchAdminName;
protected $couchAdminPass;
+ protected $couchHTTPAdapter;
+ protected $couchSSL;
protected $couch;
protected $session_couch;
@@ -61,6 +63,10 @@ public function setUp()
$this->noCacheCouch->login($this->couchAdminName, $this->couchAdminPass);
}
+ public function test_currentHTTPAdapter() {
+ $this->assertEquals($this->couch->currentHTTPAdapter(), $this->couchHTTPAdapter);
+ }
+
public function test_createDB()
{
$result = $this->couch->createDatabase($this->couchDBName);
@@ -206,7 +212,19 @@ public function test_getAllDocs()
$this->assertTrue(isset($resDefaults->body->rows[0]->value));
$this->assertFalse(isset($resDefaults->body->rows[0]->doc));
- $resAllWithDocs = $this->couch->getAllDocs(true, null, '[]', '"~~~~~~~~~"');
+ $resDescending = $this->couch->getAllDocs(true, null, '[]', '""', null, true);
+ $this->assertEquals('1', end($resDescending->body->rows)->id);
+
+ try {
+ // should throw
+ $this->couch->getAllDocs(true, null, '[]', '""', null, new stdClass());
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+
+ $resAllWithDocs = $this->couch->getAllDocs(true, null, '[]', '"~~~~~~~~~~~"');
$this->assertTrue(is_array($resAllWithDocs->body->rows));
$this->assertTrue(isset($resAllWithDocs->body->rows[0]->value));
$this->assertTrue(isset($resAllWithDocs->body->rows[0]->doc));
@@ -486,6 +504,15 @@ public function test_setCache()
$cache = new SagFileCache('/tmp/sag');
$this->couch->setCache($cache);
$this->assertEquals($cache, $this->couch->getCache());
+
+ try {
+ // should throw
+ $this->couch->setCache(new stdClass());
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
}
public function test_getFromCache()
@@ -576,7 +603,6 @@ public function test_setStaleDefault()
try
{
//We want this to throw an exception
-
$this->couch->setStaleDefault(123);
$this->assertTrue(false);
}
@@ -615,30 +641,6 @@ public function test_deleteDB()
$this->assertTrue($this->couch->deleteDatabase($this->couchDBName)->body->ok);
}
-/*
- public function test_connectionFailure()
- {
- $badCouch = new Sag('example.com');
- $badCouch->setOpenTimeout(1);
-
- try
- {
- $badCouch->setDatabase('bwah');
- $badCouch->get('/asdf');
- $this->assertTrue(false); //shouldn't reach this line
- }
- catch(SagException $e)
- {
- $this->assertTrue(true);
- }
- catch(Exception $e)
- {
- //Wrong type of exception
- $this->assertTrue(false);
- }
- }
-*/
-
public function test_timeoutRWValues()
{
//should NOT throw on positive seconds
@@ -705,6 +707,21 @@ public function test_setDatabaseAndCreate()
$this->couch->deleteDatabase($dbName);
$this->assertFalse(in_array($dbName, $this->couch->getAllDatabases()->body));
+
+ /*
+ * The database is still set internally in Sag's memory but it was also
+ * deleted. If we call setDatabase() again with the same db name and tell
+ * Sag to also create the database, then it should be created and still
+ * have the same internal state.
+ *
+ * See https://github.com/sbisbee/sag/issues/33
+ */
+ $this->couch->setDatabase($dbName, true);
+ $this->assertEquals($this->couch->currentDatabase(), $dbName);
+ $this->assertEquals($this->couch->get('/')->body->db_name, $dbName);
+
+ $this->couch->deleteDatabase($dbName);
+ $this->assertFalse(in_array($dbName, $this->couch->getAllDatabases()->body));
}
public function test_urlEncodingDatabaseName()
@@ -732,12 +749,133 @@ public function test_settersReturnSag()
}
}
- public function test_setAndGetCookie()
- {
+ public function test_setAndGetCookie() {
$this->couch->setCookie('foo', 'bar');
$this->assertEquals($this->couch->getCookie('foo'), 'bar');
$this->couch->setCookie('foo', null);
$this->assertEquals($this->couch->getCookie('foo'), null);
+
+ try {
+ // should throw
+ $this->couch->setCookie(false, 'bar');
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+
+ try {
+ // should throw
+ $this->couch->setCookie('foo', true);
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+ }
+
+ public function test_setSSL() {
+ $this->assertFalse($this->couch->usingSSL());
+
+ try {
+ $this->couch->useSSL('');
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+
+ $this->assertEquals($this->couch, $this->couch->useSSL(false));
+
+ /*
+ * Checks normal behavior, but also makes sure that adapters/libraries that
+ * do not support SSL throw a SagException.
+ */
+ try {
+ $this->assertEquals($this->couch, $this->couch->useSSL(true));
+ }
+ catch(SagException $e) {
+ if($this->couchHTTPAdapter === Sag::$HTTP_NATIVE_SOCKETS) {
+ $this->assertTrue(true);
+
+ // do not support - DONE!
+ return;
+ }
+ else {
+ throw $e;
+ }
+ }
+ }
+
+ public function test_usingSSL() {
+ $this->assertTrue(is_bool($this->couch->usingSSL()));
+ }
+
+ public function test_setSSLCert() {
+ if($this->couchHTTPAdapter === Sag::$HTTP_NATIVE_SOCKETS) {
+ return;
+ }
+
+ // should not throw or error: adapter should just quietly turn off ssl verification
+ $this->couch->setSSLCert(null);
+
+ try {
+ // should throw
+ $this->couch->setSSLCert(false);
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+
+ $file = '/tmp/sag/asdf';
+
+ $this->assertFalse(is_file($file));
+
+ try {
+ // should throw
+ $this->couch->setSSLCert($file);
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+
+ $this->assertTrue(touch($file));
+
+ $this->assertTrue(chmod($file, 0));
+
+ try {
+ // should throw
+ $this->couch->setSSLCert($file);
+ $this->assertTrue(false);
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
+
+ $this->assertTrue(chmod($file, 0600));
+
+ // should not throw
+ $this->couch->setSSLCert($file);
+
+ // clean up
+ unlink($file);
+ }
+
+ public function test_connectionFailure() {
+ $badCouch = new Sag('example.com');
+ $badCouch->setOpenTimeout(1);
+
+ try {
+ $badCouch->setDatabase('bwah');
+ $badCouch->get('/asdf');
+ $this->assertTrue(false); //shouldn't reach this line
+ }
+ catch(SagException $e) {
+ $this->assertTrue(true);
+ }
}
+
}
View
2  tests/phpunitConfig-SSL-cURL.xml
@@ -6,7 +6,7 @@
<var name="dbReplication" value="sag_tests_replication"/>
<var name="adminName" value="admin"/>
<var name="adminPass" value="passwd"/>
- <var name="httpAdapter" value="CURL_HTTP_ADAPTER"/>
+ <var name="httpAdapter" value="HTTP_CURL"/>
<var name="ssl" value="true"/>
</php>
</phpunit>
View
2  tests/phpunitConfig-cURL.xml
@@ -6,6 +6,6 @@
<var name="dbReplication" value="sag_tests_replication"/>
<var name="adminName" value="admin"/>
<var name="adminPass" value="passwd"/>
- <var name="httpAdapter" value="CURL_HTTP_ADAPTER"/>
+ <var name="httpAdapter" value="HTTP_CURL"/>
</php>
</phpunit>
View
2  tests/phpunitConfig-nativeSockets.xml
@@ -6,6 +6,6 @@
<var name="dbReplication" value="sag_tests_replication"/>
<var name="adminName" value="admin"/>
<var name="adminPass" value="passwd"/>
- <var name="httpAdapter" value="NATIVE_HTTP_ADAPTER"/>
+ <var name="httpAdapter" value="HTTP_NATIVE_SOCKETS"/>
</php>
</phpunit>
Please sign in to comment.
Something went wrong with that request. Please try again.