From 52026652cef55549aa0ba89a5fda8ae845eb0fe7 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 16 Oct 2014 10:55:56 -0400
Subject: [PATCH] Moved VuFindHttp module to external dependency.

---
 composer.json                                 |  1 +
 composer.lock                                 | 48 ++++++++-
 config/application.config.php                 |  2 +-
 install.php                                   |  3 +-
 module/VuFindHttp/.gitignore                  |  7 --
 module/VuFindHttp/Module.php                  | 58 -----------
 .../VuFindHttp/tests/unit-tests/bootstrap.php | 23 -----
 .../VuFindHttp/tests/unit-tests/phpunit.xml   | 14 ---
 vendor/autoload.php                           |  2 +-
 vendor/composer/autoload_namespaces.php       |  1 +
 vendor/composer/autoload_real.php             |  8 +-
 vendor/composer/installed.json                | 48 +++++++++
 .../vufind-org/vufindhttp}/LICENSE            |  0
 vendor/vufind-org/vufindhttp/README.md        | 15 +++
 vendor/vufind-org/vufindhttp/build.xml        | 97 +++++++++++++++++++
 .../vufind-org/vufindhttp}/composer.json      |  7 +-
 .../vufind-org/vufindhttp}/phpunit.xml        |  5 +
 .../Exception/ExceptionInterface.php          |  0
 .../VuFindHttp/Exception/RuntimeException.php |  0
 .../src/VuFindHttp/HttpService.php            |  0
 .../VuFindHttp/HttpServiceAwareInterface.php  |  0
 .../src/VuFindHttp/HttpServiceInterface.php   |  0
 .../vufindhttp}/tests/bootstrap.php           |  0
 .../src/VuFindTest/HttpServiceTest.php        | 31 +++++-
 .../vufind-org/vufindhttp/vendor/.gitignore   |  2 +
 25 files changed, 254 insertions(+), 118 deletions(-)
 delete mode 100644 module/VuFindHttp/.gitignore
 delete mode 100644 module/VuFindHttp/Module.php
 delete mode 100644 module/VuFindHttp/tests/unit-tests/bootstrap.php
 delete mode 100644 module/VuFindHttp/tests/unit-tests/phpunit.xml
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/LICENSE (100%)
 create mode 100644 vendor/vufind-org/vufindhttp/README.md
 create mode 100644 vendor/vufind-org/vufindhttp/build.xml
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/composer.json (80%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/phpunit.xml (67%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/src/VuFindHttp/Exception/ExceptionInterface.php (100%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/src/VuFindHttp/Exception/RuntimeException.php (100%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/src/VuFindHttp/HttpService.php (100%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/src/VuFindHttp/HttpServiceAwareInterface.php (100%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/src/VuFindHttp/HttpServiceInterface.php (100%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/tests/bootstrap.php (100%)
 rename {module/VuFindHttp => vendor/vufind-org/vufindhttp}/tests/unit-tests/src/VuFindTest/HttpServiceTest.php (88%)
 create mode 100644 vendor/vufind-org/vufindhttp/vendor/.gitignore

diff --git a/composer.json b/composer.json
index 6c96b2dfeeb..d76eb82208f 100644
--- a/composer.json
+++ b/composer.json
@@ -58,6 +58,7 @@
         "pear-pear.php.net/validate_ispn": "*",
         "serialssolutions/summon": "*",
         "symfony/yaml": "*",
+        "vufind-org/vufindhttp": "*",
         "zendframework/zendframework": "2.2.7",
         "zendframework/zendrest": "2.*",
         "zendframework/zendservice-amazon": "2.*",
diff --git a/composer.lock b/composer.lock
index 16796f6ef41..e32afa327c9 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "bdf603dc03336b065db2cb676f092114",
+    "hash": "9cd1fe9a339a11f246bbda40fadca844",
     "packages": [
         {
             "name": "aferrandini/phpqrcode",
@@ -557,6 +557,52 @@
             "homepage": "http://symfony.com",
             "time": "2014-09-22 09:14:18"
         },
+        {
+            "name": "vufind-org/vufindhttp",
+            "version": "v1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/vufind-org/vufindhttp.git",
+                "reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/2f56535bd3c306747ecf89ecea33c798f16f8c4e",
+                "reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e",
+                "shasum": ""
+            },
+            "require": {
+                "zendframework/zend-http": "2.2.*"
+            },
+            "require-dev": {
+                "zendframework/zend-uri": "2.2.*"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "VuFindHttp\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "David Maus",
+                    "email": "maus@hab.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Demian Katz",
+                    "email": "demian.katz@villanova.edu",
+                    "role": "Maintainer"
+                }
+            ],
+            "description": "VuFind 2.x HTTP service library",
+            "homepage": "http://vufind.org/",
+            "time": "2014-10-16 14:38:35"
+        },
         {
             "name": "zendframework/zendframework",
             "version": "2.2.7",
diff --git a/config/application.config.php b/config/application.config.php
index 357a2e6f653..49d744a6fb8 100644
--- a/config/application.config.php
+++ b/config/application.config.php
@@ -2,7 +2,7 @@
 
 // Set up modules:
 $modules = array(
-    'VuFindHttp', 'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin'
+    'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin'
 );
 if (PHP_SAPI == 'cli' && !defined('VUFIND_PHPUNIT_RUNNING')) {
     $modules[] = 'VuFindConsole';
diff --git a/install.php b/install.php
index aeddb9d2360..c05c7a17369 100644
--- a/install.php
+++ b/install.php
@@ -346,8 +346,7 @@ function validateModule($module)
     $regex = '/^[a-zA-Z][0-9a-zA-Z_]*$/';
     $illegalModules = array(
         'VuDL', 'VuFind', 'VuFindAdmin', 'VuFindConsole', 'VuFindDevTools',
-        'VuFindHttp', 'VuFindLocalTemplate', 'VuFindSearch', 'VuFindTest',
-        'VuFindTheme',
+        'VuFindLocalTemplate', 'VuFindSearch', 'VuFindTest', 'VuFindTheme',
     );
     if (in_array($module, $illegalModules)) {
         return "{$module} is a reserved module name; please try another.";
diff --git a/module/VuFindHttp/.gitignore b/module/VuFindHttp/.gitignore
deleted file mode 100644
index 6b567c718f3..00000000000
--- a/module/VuFindHttp/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-TAGS
-\#*
-.\#*
-ChangeLog
-review
-test.php
-vendor/
diff --git a/module/VuFindHttp/Module.php b/module/VuFindHttp/Module.php
deleted file mode 100644
index 91dca4cda12..00000000000
--- a/module/VuFindHttp/Module.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-/**
- * ZF2 module definition for the VF2 http service
- *
- * PHP version 5
- *
- * Copyright (C) Villanova University 2012, 2013.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * @category VuFind2
- * @package  Http
- * @author   David Maus <maus@hab.de>
- * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @link     http://vufind.org
- */
-namespace VuFindHttp;
-
-/**
- * ZF2 module definition for the VF2 HTTP service.
- *
- * @category VuFind2
- * @package  Http
- * @author   David Maus <maus@hab.de>
- * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @link     http://vufind.org
- */
-class Module
-{
-    /**
-     * Return autoloader configuration.
-     *
-     * @return array
-     */
-    public function getAutoloaderConfig()
-    {
-        return array(
-            'Zend\Loader\StandardAutoloader' => array(
-                'namespaces' => array(
-                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
-                ),
-            ),
-        );
-    }
-
-}
\ No newline at end of file
diff --git a/module/VuFindHttp/tests/unit-tests/bootstrap.php b/module/VuFindHttp/tests/unit-tests/bootstrap.php
deleted file mode 100644
index fcc2fd66998..00000000000
--- a/module/VuFindHttp/tests/unit-tests/bootstrap.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/**
- * Proxy service PHPUnit bootstrap.
- *
- * @author    David Maus <maus@hab.de>
- * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License
- * @copyright Copyright (C) Villanova University 2011
- *
- */
-
-require_once('Zend/Loader/AutoloaderFactory.php');
-\Zend\Loader\AutoloaderFactory::factory(
-    array(
-        'Zend\Loader\StandardAutoloader' => array(
-            'namespaces' => array(
-                'VuFindHttp' => realpath(__DIR__ . '/../../src/VuFindHttp'),
-                'VuFindTest' => realpath(__DIR__ . '/src/VuFindTest'),
-            ),
-            'autoregister_zf' => true
-        )
-    )
-);
diff --git a/module/VuFindHttp/tests/unit-tests/phpunit.xml b/module/VuFindHttp/tests/unit-tests/phpunit.xml
deleted file mode 100644
index 1cbaaf01a44..00000000000
--- a/module/VuFindHttp/tests/unit-tests/phpunit.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<phpunit bootstrap="bootstrap.php">
-  <testsuites>
-    <testsuite name="core-proxy">
-      <directory>src</directory>
-    </testsuite>
-  </testsuites>
-  <logging>
-    <log type="coverage-html" target="../../review/coverage"/>
-  </logging>
-  <php>
-    <includePath>../../vendor/zf2/library</includePath>
-  </php>
-</phpunit>
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 3d383ebdaa8..5b9cf272a45 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86::getLoader();
+return ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa::getLoader();
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index 33addd7ad2b..f32f348f63c 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -11,6 +11,7 @@ return array(
     'ZendService\\Amazon\\' => array($vendorDir . '/zendframework/zendservice-amazon/library'),
     'ZendService' => array($vendorDir . '/zendframework/zendservice-recaptcha/library'),
     'ZendRest' => array($vendorDir . '/zendframework/zendrest/library'),
+    'VuFindHttp\\' => array($vendorDir . '/vufind-org/vufindhttp/src'),
     'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
     'SerialsSolutions' => array($vendorDir . '/serialssolutions/summon'),
     'ProxyManager\\' => array($vendorDir . '/ocramius/proxy-manager/src'),
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index ea9f2bfdc71..e943ac1ba11 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86
+class ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit7dec02740c412b5209419ea980a0c5fa', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         array_push($includePaths, get_include_path());
@@ -48,7 +48,7 @@ class ComposerAutoloaderInit0f2072e16558438728ae5fe1a74a0c86
     }
 }
 
-function composerRequire0f2072e16558438728ae5fe1a74a0c86($file)
+function composerRequire7dec02740c412b5209419ea980a0c5fa($file)
 {
     require $file;
 }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index f75eae69138..6a6c74b0881 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -903,5 +903,53 @@
         ],
         "description": "Symfony Yaml Component",
         "homepage": "http://symfony.com"
+    },
+    {
+        "name": "vufind-org/vufindhttp",
+        "version": "v1.0.0",
+        "version_normalized": "1.0.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/vufind-org/vufindhttp.git",
+            "reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/2f56535bd3c306747ecf89ecea33c798f16f8c4e",
+            "reference": "2f56535bd3c306747ecf89ecea33c798f16f8c4e",
+            "shasum": ""
+        },
+        "require": {
+            "zendframework/zend-http": "2.2.*"
+        },
+        "require-dev": {
+            "zendframework/zend-uri": "2.2.*"
+        },
+        "time": "2014-10-16 14:38:35",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "VuFindHttp\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "GPL-2.0"
+        ],
+        "authors": [
+            {
+                "name": "David Maus",
+                "email": "maus@hab.de",
+                "role": "Developer"
+            },
+            {
+                "name": "Demian Katz",
+                "email": "demian.katz@villanova.edu",
+                "role": "Maintainer"
+            }
+        ],
+        "description": "VuFind 2.x HTTP service library",
+        "homepage": "http://vufind.org/"
     }
 ]
diff --git a/module/VuFindHttp/LICENSE b/vendor/vufind-org/vufindhttp/LICENSE
similarity index 100%
rename from module/VuFindHttp/LICENSE
rename to vendor/vufind-org/vufindhttp/LICENSE
diff --git a/vendor/vufind-org/vufindhttp/README.md b/vendor/vufind-org/vufindhttp/README.md
new file mode 100644
index 00000000000..5797d801d5e
--- /dev/null
+++ b/vendor/vufind-org/vufindhttp/README.md
@@ -0,0 +1,15 @@
+VuFindHttp
+==========
+
+Introduction
+------------
+VuFindHttp contains a convenience class built around Zend\Http\Client which allows
+creation of proxy-aware clients and convenient GET/POST behavior. This is part of
+the VuFind project (http://vufind.org) but may be useful for any software dealing
+with HTTP calls.
+
+
+Installation
+------------
+The recommended method for incorporating this library into your project is to use
+Composer (http://getcomposer.org).
\ No newline at end of file
diff --git a/vendor/vufind-org/vufindhttp/build.xml b/vendor/vufind-org/vufindhttp/build.xml
new file mode 100644
index 00000000000..3ff7d2dc0ac
--- /dev/null
+++ b/vendor/vufind-org/vufindhttp/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="vufindhttp" basedir="." default="main">
+  <property name="tmp" value="/tmp" />
+  <property name="package"  value="${phing.project.name}" override="true" />
+  <property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" />
+  <property name="srcdir"   value="${project.basedir}" override="true" />
+
+  <!-- Main Target -->
+  <target name="main" description="main target">
+    <trycatch property="exceptionmsg">
+      <try>
+        <phingcall target="startup" />
+        <phingcall target="ci-tasks" />
+        <phingcall target="shutdown" />
+      </try>
+      <catch>
+        <phingcall target="shutdown" />
+        <fail>Unexpected error during continuous integration tasks -- ${exceptionmsg}</fail>
+      </catch>
+    </trycatch>
+  </target>
+
+  <!-- Continuous Integration Tasks -->
+  <target name="ci-tasks" description="continuous integration tasks">
+
+    <!-- Create dirs -->
+    <mkdir dir="${builddir}/reports"/>
+    <mkdir dir="${builddir}/reports/coverage"/>
+
+    <!-- Call standard tasks -->
+    <phingcall target="phpcs"/>
+    <phingcall target="phpunit"/>
+    <phingcall target="phpdoc"/>
+    <phingcall target="phpcpd"/>
+    <phingcall target="phpmd"/>
+    <phingcall target="pdepend"/>
+    <phingcall target="phploc"/>
+  </target>
+
+  <!-- Report rule violations with PHPMD (mess detector) -->
+  <target name="phpmd">
+    <exec command="phpmd ${srcdir}/src xml ${srcdir}/tests/phpmd.xml --exclude ${srcdir}/tests --reportfile ${builddir}/reports/phpmd.xml" />
+  </target>
+
+  <!-- Measure project with phploc -->
+  <target name="phploc">
+    <exec command="phploc --log-csv ${builddir}/reports/phploc.csv ${srcdir}/src" />
+  </target>
+
+  <!-- PHP_Depend code analysis -->
+  <target name="pdepend">
+    <exec command="pdepend --jdepend-xml=${builddir}/reports/jdepend.xml --jdepend-chart=${builddir}/reports/dependencies.svg --overview-pyramid=${builddir}/reports/pdepend-pyramid.svg ${srcdir}/src" />
+  </target>
+
+  <!-- PHP copy-and-paste detection -->
+  <target name="phpcpd">
+    <exec command="phpcpd --log-pmd ${builddir}/reports/pmd-cpd.xml --exclude tests ${srcdir}/src" />
+  </target>
+
+  <!-- PHP CodeSniffer -->
+  <target name="phpcs">
+    <exec command="phpcs --standard=PEAR --ignore=tests/* --extensions=php --report=checkstyle ${srcdir}/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
+  </target>
+
+  <!-- PHP API Documentation -->
+  <target name="phpdoc">
+    <mkdir dir="${builddir}/apidocs"/>
+    <phpdoc2 title="VuFindHttp API Documentation"
+      destdir="${builddir}/apidocs">
+      <fileset dir=".">
+        <include name="src/**/*.php" />
+      </fileset>
+    </phpdoc2>
+  </target>
+
+  <!-- PHPUnit -->
+  <target name="phpunit" description="Run tests">
+    <exec dir="${srcdir}" command="phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" />
+  </target>
+
+  <!-- PHPUnit without logging output -->
+  <target name="phpunitfast" description="Run tests">
+    <exec dir="${srcdir}" command="phpunit -dzend.enable_gc=0" passthru="true" checkreturn="true" />
+  </target>
+
+  <!-- Set up dependencies -->
+  <target name="startup" description="set up dependencies">
+    <exec command="composer install" />
+  </target>
+
+  <!-- Uninstall and Deactivate VuFind -->
+  <target name="shutdown" description="clean up file system">
+    <delete dir="${srcdir}/vendor" includeemptydirs="true" failonerror="true" />
+    <delete file="${srcdir}/composer.lock" failonerror="true" />
+    <exec command="git reset --hard" />
+  </target>
+</project>
diff --git a/module/VuFindHttp/composer.json b/vendor/vufind-org/vufindhttp/composer.json
similarity index 80%
rename from module/VuFindHttp/composer.json
rename to vendor/vufind-org/vufindhttp/composer.json
index ca6cf8b8aed..c082536b960 100644
--- a/module/VuFindHttp/composer.json
+++ b/vendor/vufind-org/vufindhttp/composer.json
@@ -1,5 +1,5 @@
 {
-    "name": "vufind/http",
+    "name": "vufind-org/vufindhttp",
     "description": "VuFind 2.x HTTP service library",
     "authors": [
         {
@@ -18,9 +18,6 @@
     "support": {
         "issues": "http://vufind.org/jira"
     },
-    "repositories": [
-	{ "type": "composer", "url":  "http://packages.zendframework.com/" }
-    ],
     "require": {
         "zendframework/zend-http": "2.2.*"
     },
@@ -29,7 +26,7 @@
     },
     "autoload": {
         "psr-0": {
-            "VuFindHttp\\": "src"
+            "VuFindHttp\\": "src/"
         }
     }
 }
diff --git a/module/VuFindHttp/phpunit.xml b/vendor/vufind-org/vufindhttp/phpunit.xml
similarity index 67%
rename from module/VuFindHttp/phpunit.xml
rename to vendor/vufind-org/vufindhttp/phpunit.xml
index e01b88137ac..3a7d627bc4c 100644
--- a/module/VuFindHttp/phpunit.xml
+++ b/vendor/vufind-org/vufindhttp/phpunit.xml
@@ -9,4 +9,9 @@
   <php>
     <includePath>.</includePath>
   </php>
+  <filter>
+    <whitelist addUncoveredFilesFromWhitelist="true">
+      <directory suffix=".php">src</directory>
+    </whitelist>
+  </filter>
 </phpunit>
diff --git a/module/VuFindHttp/src/VuFindHttp/Exception/ExceptionInterface.php b/vendor/vufind-org/vufindhttp/src/VuFindHttp/Exception/ExceptionInterface.php
similarity index 100%
rename from module/VuFindHttp/src/VuFindHttp/Exception/ExceptionInterface.php
rename to vendor/vufind-org/vufindhttp/src/VuFindHttp/Exception/ExceptionInterface.php
diff --git a/module/VuFindHttp/src/VuFindHttp/Exception/RuntimeException.php b/vendor/vufind-org/vufindhttp/src/VuFindHttp/Exception/RuntimeException.php
similarity index 100%
rename from module/VuFindHttp/src/VuFindHttp/Exception/RuntimeException.php
rename to vendor/vufind-org/vufindhttp/src/VuFindHttp/Exception/RuntimeException.php
diff --git a/module/VuFindHttp/src/VuFindHttp/HttpService.php b/vendor/vufind-org/vufindhttp/src/VuFindHttp/HttpService.php
similarity index 100%
rename from module/VuFindHttp/src/VuFindHttp/HttpService.php
rename to vendor/vufind-org/vufindhttp/src/VuFindHttp/HttpService.php
diff --git a/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php b/vendor/vufind-org/vufindhttp/src/VuFindHttp/HttpServiceAwareInterface.php
similarity index 100%
rename from module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php
rename to vendor/vufind-org/vufindhttp/src/VuFindHttp/HttpServiceAwareInterface.php
diff --git a/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php b/vendor/vufind-org/vufindhttp/src/VuFindHttp/HttpServiceInterface.php
similarity index 100%
rename from module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php
rename to vendor/vufind-org/vufindhttp/src/VuFindHttp/HttpServiceInterface.php
diff --git a/module/VuFindHttp/tests/bootstrap.php b/vendor/vufind-org/vufindhttp/tests/bootstrap.php
similarity index 100%
rename from module/VuFindHttp/tests/bootstrap.php
rename to vendor/vufind-org/vufindhttp/tests/bootstrap.php
diff --git a/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php b/vendor/vufind-org/vufindhttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
similarity index 88%
rename from module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
rename to vendor/vufind-org/vufindhttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
index 14c4862b675..bcd61e0d73e 100644
--- a/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php
+++ b/vendor/vufind-org/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 Unit\TestCase
+class ProxyServiceTest extends \PHPUnit_Framework_TestCase
 {
 
     protected $local = array('ipv4 localhost' => 'http://localhost',
@@ -136,7 +136,15 @@ class ProxyServiceTest extends Unit\TestCase
     public function testPostForm()
     {
         $service = new Service();
-        $adapter = new \Zend\Http\Client\Adapter\Test();
+        $adapter = $this->getMock('Zend\Http\Client\Adapter\Test', array('write'));
+        $adapter->expects($this->once())
+            ->method('write')
+            ->with(
+                $this->equalTo('POST'),
+                $this->equalTo(
+                    new \Zend\Uri\Http('http://example.tld', 'foo=bar&bar=baz')
+                )
+            );
         $service->setDefaultAdapter($adapter);
         $service->postForm('http://example.tld', array('foo=bar'));
     }
@@ -260,4 +268,23 @@ class ProxyServiceTest extends Unit\TestCase
         $clientConfig = $this->getProperty($client, 'config');
         $this->assertEquals($clientConfig['timeout'], 67);
     }
+
+    /**
+     * Return protected or private property.
+     *
+     * Uses PHP's reflection API in order to modify property accessibility.
+     *
+     * @param object|string $object   Object or class name
+     * @param string        $property Property name
+     *
+     * @throws \ReflectionException Property does not exist
+     *
+     * @return mixed
+     */
+    protected function getProperty($object, $property)
+    {
+        $reflectionProperty = new \ReflectionProperty($object, $property);
+        $reflectionProperty->setAccessible(true);
+        return $reflectionProperty->getValue($object);
+    }
 }
\ No newline at end of file
diff --git a/vendor/vufind-org/vufindhttp/vendor/.gitignore b/vendor/vufind-org/vufindhttp/vendor/.gitignore
new file mode 100644
index 00000000000..c96a04f008e
--- /dev/null
+++ b/vendor/vufind-org/vufindhttp/vendor/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
-- 
GitLab