From 48537a8e86ae9854a595b8eedfbb83f14707487e Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 10 Sep 2013 15:53:22 -0400
Subject: [PATCH] Expanded test coverage.

---
 .../src/VuFindTest/HttpServiceTest.php        | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php b/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
index 6cbd9031d89..14c4862b675 100644
--- a/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
+++ b/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
@@ -58,7 +58,7 @@ use VuFindHttp\HttpService as Service;
  * @link     https://github.com/dmj/vf2-proxy
  */
 
-class ProxyServiceTest extends \PHPUnit_Framework_TestCase
+class ProxyServiceTest extends Unit\TestCase
 {
 
     protected $local = array('ipv4 localhost' => 'http://localhost',
@@ -235,4 +235,29 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue(Service::isAssocParams($arr));
     }
 
+    /**
+     * Test default settings.
+     *
+     * @return void
+     */
+    public function testDefaults()
+    {
+        $service = new Service(array(), array('foo' => 'bar'));
+        $client = $service->createClient();
+        $clientConfig = $this->getProperty($client, 'config');
+        $this->assertEquals($clientConfig['foo'], 'bar');
+    }
+
+    /**
+     * Test timeout setting.
+     *
+     * @return void
+     */
+    public function testTimeout()
+    {
+        $service = new Service();
+        $client = $service->createClient(null, \Zend\Http\Request::METHOD_GET, 67);
+        $clientConfig = $this->getProperty($client, 'config');
+        $this->assertEquals($clientConfig['timeout'], 67);
+    }
 }
\ No newline at end of file
-- 
GitLab