The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 48537a8e authored by Demian Katz's avatar Demian Katz
Browse files

Expanded test coverage.

parent 99bcfe38
No related merge requests found
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment