From 2687898cd36c828ab738e6d857878720197a9f24 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 8 Mar 2017 11:30:08 -0500
Subject: [PATCH] Update PHPUnit. (#899)

---
 composer.json                                 |   2 +-
 composer.lock                                 | 598 ++++++++++++------
 .../VuFind/src/VuFindTest/Unit/DbTestCase.php |   2 +-
 .../VuFind/src/VuFindTest/Unit/TestCase.php   |   2 +-
 .../src/VuFindTest/Auth/ILSTest.php           |   4 +-
 .../src/VuFindTest/Auth/ShibbolethTest.php    |   2 +-
 .../View/Helper/Root/ResultFeedTest.php       |  21 +-
 .../src/VuFindTest/Auth/DatabaseUnitTest.php  |   8 +-
 .../src/VuFindTest/Autocomplete/TagTest.php   |   4 +-
 .../unit-tests/src/VuFindTest/CartTest.php    |  21 +-
 .../VuFindTest/Config/PluginFactoryTest.php   |   2 +-
 .../VuFindTest/Content/Covers/AmazonTest.php  |  30 +-
 .../Controller/Plugin/NewItemsTest.php        |  34 +-
 .../Controller/Plugin/ResultScrollerTest.php  |  54 +-
 .../src/VuFindTest/Cover/LoaderTest.php       |  19 +-
 .../src/VuFindTest/ILS/Driver/DemoTest.php    |   2 +-
 .../ILS/Driver/MultiBackendTest.php           | 148 ++++-
 .../src/VuFindTest/ILS/Driver/NoILSTest.php   |  14 +-
 .../src/VuFindTest/Log/LoggerTest.php         |   4 +-
 .../src/VuFindTest/Mailer/MailerTest.php      |  38 +-
 .../src/VuFindTest/QRCode/LoaderTest.php      |   8 +-
 .../Recommend/RandomRecommendTest.php         |  36 +-
 .../src/VuFindTest/Record/CacheTest.php       |   4 +-
 .../src/VuFindTest/Record/LoaderTest.php      |  18 +-
 .../src/VuFindTest/Record/RouterTest.php      |  16 +-
 .../src/VuFindTest/Related/SimilarTest.php    |   8 +-
 .../Related/WorldCatSimilarTest.php           |  15 +-
 .../Role/DynamicRoleProviderTest.php          |   2 +-
 .../src/VuFindTest/SMS/ClickatellTest.php     |   2 +-
 .../Search/Primo/OnCampusListenerTest.php     |   4 +-
 .../Search/SearchTabsHelperTest.php           |   6 +-
 .../Solr/ConditionalFilterListenerTest.php    |   2 +-
 .../FilterFieldConversionListenerTest.php     |   2 +-
 .../Solr/HideFacetValueListenerTest.php       |   2 +-
 .../Search/Solr/MultiIndexListenerTest.php    |   2 +-
 .../VuFindTest/Search/UrlQueryHelperTest.php  |   2 +-
 .../Helper/Root/RecordDataFormatterTest.php   |   2 +-
 .../View/Helper/Root/RecordTest.php           |  12 +-
 .../View/Helper/Root/SafeMoneyFormatTest.php  |   2 +-
 .../View/Helper/Root/TranslateTest.php        |   6 +-
 .../Formatter/FacetFormatterTest.php          |   4 +-
 .../src/VuFindTest/LanguageHelperTest.php     |   2 +-
 .../VuFindTest/Backend/EDS/BackendTest.php    |  27 +-
 .../VuFindTest/Backend/EIT/BackendTest.php    |  19 +-
 .../Backend/LibGuides/BackendTest.php         |  12 +-
 .../Backend/Pazpar2/BackendTest.php           |  18 +-
 .../VuFindTest/Backend/Primo/BackendTest.php  |  12 +-
 .../VuFindTest/Backend/Solr/BackendTest.php   |  23 +-
 .../VuFindTest/Backend/Solr/ConnectorTest.php |   2 +-
 .../Response/Json/RecordCollectionTest.php    |   2 +-
 .../VuFindTest/Backend/Summon/BackendTest.php |  13 +-
 .../Backend/WorldCat/BackendTest.php          |  12 +-
 .../Backend/WorldCat/ConnectorTest.php        |  20 +-
 .../src/VuFindTest/SearchServiceTest.php      |  65 +-
 .../src/VuFindTest/ThemeMobileTest.php        |   4 +-
 .../View/Helper/HeadThemeResourcesTest.php    |   2 +-
 56 files changed, 923 insertions(+), 474 deletions(-)

diff --git a/composer.json b/composer.json
index eccd2239b05..d60337029a6 100644
--- a/composer.json
+++ b/composer.json
@@ -67,7 +67,7 @@
         "phpdocumentor/phpdocumentor": "2.9.0",
         "phploc/phploc": "3.0.1",
         "phpmd/phpmd": "2.6.0",
-        "phpunit/phpunit": "4.8.27",
+        "phpunit/phpunit": "5.7.9",
         "sebastian/phpcpd": "2.0.4",
         "squizlabs/php_codesniffer": "2.8.0",
         "twig/twig": "1.27"
diff --git a/composer.lock b/composer.lock
index 5c2cac7ace3..4ee117bad7e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "4549a252af7369774c5719962ae2c7dd",
+    "hash": "b2b536c81dc03973879b86c3b934b5bd",
+    "content-hash": "d5d0245577326cfaa4743264df8c28e1",
     "packages": [
         {
             "name": "aferrandini/phpqrcode",
@@ -48,7 +49,7 @@
                 "php",
                 "qrcode"
             ],
-            "time": "2013-07-08T09:39:08+00:00"
+            "time": "2013-07-08 09:39:08"
         },
         {
             "name": "ahand/mobileesp",
@@ -137,7 +138,7 @@
             ],
             "description": "PHP class library to facilitate communication with Integrated Library System (ILS) servers via 3M's SIP2.",
             "homepage": "https://github.com/cap60552/php-sip2",
-            "time": "2015-11-03T04:42:39+00:00"
+            "time": "2015-11-03 04:42:39"
         },
         {
             "name": "container-interop/container-interop",
@@ -168,7 +169,7 @@
             ],
             "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
             "homepage": "https://github.com/container-interop/container-interop",
-            "time": "2017-02-14T19:40:03+00:00"
+            "time": "2017-02-14 19:40:03"
         },
         {
             "name": "jasig/phpcas",
@@ -222,7 +223,7 @@
                 "cas",
                 "jasig"
             ],
-            "time": "2015-11-16T20:44:36+00:00"
+            "time": "2015-11-16 20:44:36"
         },
         {
             "name": "matthiasmullie/minify",
@@ -279,7 +280,7 @@
                 "minifier",
                 "minify"
             ],
-            "time": "2017-01-26T15:48:07+00:00"
+            "time": "2017-01-26 15:48:07"
         },
         {
             "name": "matthiasmullie/path-converter",
@@ -328,7 +329,7 @@
                 "paths",
                 "relative"
             ],
-            "time": "2017-01-26T08:54:49+00:00"
+            "time": "2017-01-26 08:54:49"
         },
         {
             "name": "ocramius/proxy-manager",
@@ -391,7 +392,7 @@
                 "proxy pattern",
                 "service proxies"
             ],
-            "time": "2015-08-09T04:28:19+00:00"
+            "time": "2015-08-09 04:28:19"
         },
         {
             "name": "oyejorge/less.php",
@@ -457,7 +458,7 @@
                 "php",
                 "stylesheet"
             ],
-            "time": "2017-02-23T14:18:55+00:00"
+            "time": "2017-02-23 14:18:55"
         },
         {
             "name": "pear/file_marc",
@@ -504,7 +505,7 @@
                 }
             ],
             "description": "Supports the MAchine Readable Cataloging (MARC) file format documented at http://loc.gov/marc/",
-            "time": "2017-01-23T16:49:13+00:00"
+            "time": "2017-01-23 16:49:13"
         },
         {
             "name": "pear/http_request2",
@@ -563,7 +564,7 @@
                 "http",
                 "request"
             ],
-            "time": "2016-02-13T20:20:39+00:00"
+            "time": "2016-02-13 20:20:39"
         },
         {
             "name": "pear/net_url2",
@@ -624,7 +625,7 @@
                 "uri",
                 "url"
             ],
-            "time": "2016-04-18T22:24:01+00:00"
+            "time": "2016-04-18 22:24:01"
         },
         {
             "name": "pear/pear_exception",
@@ -679,7 +680,7 @@
             "keywords": [
                 "exception"
             ],
-            "time": "2015-02-10T20:07:52+00:00"
+            "time": "2015-02-10 20:07:52"
         },
         {
             "name": "pear/validate",
@@ -750,7 +751,7 @@
             ],
             "description": "Validate numbers, email, strings, dates, URIs and more",
             "homepage": "http://pear.php.net/package/Validate",
-            "time": "2015-02-20T09:16:13+00:00"
+            "time": "2015-02-20 09:16:13"
         },
         {
             "name": "pear/validate_ispn",
@@ -891,7 +892,7 @@
                 "task",
                 "tool"
             ],
-            "time": "2016-12-22T20:16:33+00:00"
+            "time": "2016-12-22 20:16:33"
         },
         {
             "name": "psr/container",
@@ -940,7 +941,7 @@
                 "container-interop",
                 "psr"
             ],
-            "time": "2017-02-14T16:28:37+00:00"
+            "time": "2017-02-14 16:28:37"
         },
         {
             "name": "psr/http-message",
@@ -990,7 +991,7 @@
                 "request",
                 "response"
             ],
-            "time": "2016-08-06T14:39:51+00:00"
+            "time": "2016-08-06 14:39:51"
         },
         {
             "name": "psr/log",
@@ -1037,7 +1038,7 @@
                 "psr",
                 "psr-3"
             ],
-            "time": "2016-10-10T12:19:37+00:00"
+            "time": "2016-10-10 12:19:37"
         },
         {
             "name": "serialssolutions/summon",
@@ -1070,7 +1071,7 @@
                 }
             ],
             "description": "Library for interacting with Serials Solutions' Summon API.",
-            "time": "2013-11-13T19:07:09+00:00"
+            "time": "2013-11-13 19:07:09"
         },
         {
             "name": "swagger-api/swagger-ui",
@@ -1111,7 +1112,7 @@
                 "swagger",
                 "ui"
             ],
-            "time": "2017-01-05T08:57:09+00:00"
+            "time": "2017-01-05 08:57:09"
         },
         {
             "name": "symfony/yaml",
@@ -1166,7 +1167,7 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
-            "time": "2017-02-16T22:46:52+00:00"
+            "time": "2017-02-16 22:46:52"
         },
         {
             "name": "vufind-org/vufindcode",
@@ -1211,7 +1212,7 @@
             ],
             "description": "Class for representing ISBNs (a VuFind support library)",
             "homepage": "https://vufind.org/",
-            "time": "2016-06-06T19:12:16+00:00"
+            "time": "2016-06-06 19:12:16"
         },
         {
             "name": "vufind-org/vufindharvest",
@@ -1261,7 +1262,7 @@
             ],
             "description": "VuFind Harvest Tools",
             "homepage": "https://vufind.org/",
-            "time": "2016-12-16T16:19:52+00:00"
+            "time": "2016-12-16 16:19:52"
         },
         {
             "name": "vufind-org/vufindhttp",
@@ -1314,7 +1315,7 @@
             ],
             "description": "VuFind HTTP service library",
             "homepage": "https://vufind.org/",
-            "time": "2016-09-23T12:51:36+00:00"
+            "time": "2016-09-23 12:51:36"
         },
         {
             "name": "yajra/laravel-pdo-via-oci8",
@@ -1350,7 +1351,7 @@
                 }
             ],
             "description": "PDO userspace driver proxying calls to PHP OCI8 driver",
-            "time": "2017-02-02T02:51:53+00:00"
+            "time": "2017-02-02 02:51:53"
         },
         {
             "name": "zendframework/zend-cache",
@@ -1419,7 +1420,7 @@
                 "cache",
                 "zf2"
             ],
-            "time": "2016-12-16T11:35:47+00:00"
+            "time": "2016-12-16 11:35:47"
         },
         {
             "name": "zendframework/zend-captcha",
@@ -1476,7 +1477,7 @@
                 "captcha",
                 "zf2"
             ],
-            "time": "2017-02-23T08:09:44+00:00"
+            "time": "2017-02-23 08:09:44"
         },
         {
             "name": "zendframework/zend-code",
@@ -1528,7 +1529,7 @@
                 "code",
                 "zf2"
             ],
-            "time": "2016-04-20T17:26:42+00:00"
+            "time": "2016-04-20 17:26:42"
         },
         {
             "name": "zendframework/zend-config",
@@ -1584,7 +1585,7 @@
                 "config",
                 "zf2"
             ],
-            "time": "2016-02-04T23:01:10+00:00"
+            "time": "2016-02-04 23:01:10"
         },
         {
             "name": "zendframework/zend-console",
@@ -1636,7 +1637,7 @@
                 "console",
                 "zf2"
             ],
-            "time": "2016-02-09T17:15:12+00:00"
+            "time": "2016-02-09 17:15:12"
         },
         {
             "name": "zendframework/zend-crypt",
@@ -1686,7 +1687,7 @@
                 "crypt",
                 "zf2"
             ],
-            "time": "2016-02-03T23:46:30+00:00"
+            "time": "2016-02-03 23:46:30"
         },
         {
             "name": "zendframework/zend-db",
@@ -1743,7 +1744,7 @@
                 "db",
                 "zf2"
             ],
-            "time": "2016-08-09T19:28:55+00:00"
+            "time": "2016-08-09 19:28:55"
         },
         {
             "name": "zendframework/zend-diactoros",
@@ -1793,7 +1794,7 @@
                 "psr",
                 "psr-7"
             ],
-            "time": "2017-01-23T04:53:24+00:00"
+            "time": "2017-01-23 04:53:24"
         },
         {
             "name": "zendframework/zend-dom",
@@ -1838,7 +1839,7 @@
                 "dom",
                 "zf2"
             ],
-            "time": "2015-10-14T03:37:48+00:00"
+            "time": "2015-10-14 03:37:48"
         },
         {
             "name": "zendframework/zend-escaper",
@@ -1882,7 +1883,7 @@
                 "escaper",
                 "zf2"
             ],
-            "time": "2016-06-30T19:48:38+00:00"
+            "time": "2016-06-30 19:48:38"
         },
         {
             "name": "zendframework/zend-eventmanager",
@@ -1929,7 +1930,7 @@
                 "eventmanager",
                 "zf2"
             ],
-            "time": "2016-02-18T20:49:05+00:00"
+            "time": "2016-02-18 20:49:05"
         },
         {
             "name": "zendframework/zend-feed",
@@ -1988,7 +1989,7 @@
                 "feed",
                 "zf2"
             ],
-            "time": "2015-08-04T21:39:18+00:00"
+            "time": "2015-08-04 21:39:18"
         },
         {
             "name": "zendframework/zend-filter",
@@ -2048,7 +2049,7 @@
                 "filter",
                 "zf2"
             ],
-            "time": "2016-04-18T18:32:43+00:00"
+            "time": "2016-04-18 18:32:43"
         },
         {
             "name": "zendframework/zend-form",
@@ -2125,7 +2126,7 @@
                 "form",
                 "zf2"
             ],
-            "time": "2017-02-23T16:03:25+00:00"
+            "time": "2017-02-23 16:03:25"
         },
         {
             "name": "zendframework/zend-http",
@@ -2175,7 +2176,7 @@
                 "http",
                 "zf2"
             ],
-            "time": "2017-01-31T14:41:02+00:00"
+            "time": "2017-01-31 14:41:02"
         },
         {
             "name": "zendframework/zend-hydrator",
@@ -2233,7 +2234,7 @@
                 "hydrator",
                 "zf2"
             ],
-            "time": "2016-02-18T22:38:26+00:00"
+            "time": "2016-02-18 22:38:26"
         },
         {
             "name": "zendframework/zend-i18n",
@@ -2300,7 +2301,7 @@
                 "i18n",
                 "zf2"
             ],
-            "time": "2016-06-07T21:08:30+00:00"
+            "time": "2016-06-07 21:08:30"
         },
         {
             "name": "zendframework/zend-inputfilter",
@@ -2355,7 +2356,7 @@
                 "inputfilter",
                 "zf2"
             ],
-            "time": "2016-08-18T18:40:34+00:00"
+            "time": "2016-08-18 18:40:34"
         },
         {
             "name": "zendframework/zend-json",
@@ -2410,7 +2411,7 @@
                 "json",
                 "zf2"
             ],
-            "time": "2016-02-04T21:20:26+00:00"
+            "time": "2016-02-04 21:20:26"
         },
         {
             "name": "zendframework/zend-loader",
@@ -2454,7 +2455,7 @@
                 "loader",
                 "zf2"
             ],
-            "time": "2015-06-03T14:05:47+00:00"
+            "time": "2015-06-03 14:05:47"
         },
         {
             "name": "zendframework/zend-log",
@@ -2525,7 +2526,7 @@
                 "logging",
                 "zf2"
             ],
-            "time": "2016-08-11T13:44:10+00:00"
+            "time": "2016-08-11 13:44:10"
         },
         {
             "name": "zendframework/zend-mail",
@@ -2585,7 +2586,7 @@
                 "mail",
                 "zf2"
             ],
-            "time": "2017-02-14T18:03:34+00:00"
+            "time": "2017-02-14 18:03:34"
         },
         {
             "name": "zendframework/zend-math",
@@ -2635,7 +2636,7 @@
                 "math",
                 "zf2"
             ],
-            "time": "2016-04-07T16:29:53+00:00"
+            "time": "2016-04-07 16:29:53"
         },
         {
             "name": "zendframework/zend-mime",
@@ -2684,7 +2685,7 @@
                 "mime",
                 "zf2"
             ],
-            "time": "2017-01-16T16:43:38+00:00"
+            "time": "2017-01-16 16:43:38"
         },
         {
             "name": "zendframework/zend-modulemanager",
@@ -2743,7 +2744,7 @@
                 "modulemanager",
                 "zf2"
             ],
-            "time": "2016-05-16T21:21:11+00:00"
+            "time": "2016-05-16 21:21:11"
         },
         {
             "name": "zendframework/zend-mvc",
@@ -2833,7 +2834,7 @@
                 "mvc",
                 "zf2"
             ],
-            "time": "2016-05-31T17:18:50+00:00"
+            "time": "2016-05-31 17:18:50"
         },
         {
             "name": "zendframework/zend-paginator",
@@ -2897,7 +2898,7 @@
                 "paginator",
                 "zf2"
             ],
-            "time": "2016-04-11T21:18:13+00:00"
+            "time": "2016-04-11 21:18:13"
         },
         {
             "name": "zendframework/zend-psr7bridge",
@@ -2946,7 +2947,7 @@
                 "psr",
                 "psr-7"
             ],
-            "time": "2016-05-10T21:44:39+00:00"
+            "time": "2016-05-10 21:44:39"
         },
         {
             "name": "zendframework/zend-serializer",
@@ -3003,7 +3004,7 @@
                 "serializer",
                 "zf2"
             ],
-            "time": "2016-06-21T17:01:55+00:00"
+            "time": "2016-06-21 17:01:55"
         },
         {
             "name": "zendframework/zend-server",
@@ -3049,7 +3050,7 @@
                 "server",
                 "zf2"
             ],
-            "time": "2016-06-20T22:27:55+00:00"
+            "time": "2016-06-20 22:27:55"
         },
         {
             "name": "zendframework/zend-servicemanager",
@@ -3101,7 +3102,7 @@
                 "servicemanager",
                 "zf2"
             ],
-            "time": "2016-02-02T14:11:46+00:00"
+            "time": "2016-02-02 14:11:46"
         },
         {
             "name": "zendframework/zend-session",
@@ -3167,7 +3168,7 @@
                 "session",
                 "zf2"
             ],
-            "time": "2016-07-05T18:32:50+00:00"
+            "time": "2016-07-05 18:32:50"
         },
         {
             "name": "zendframework/zend-soap",
@@ -3219,7 +3220,7 @@
                 "soap",
                 "zf2"
             ],
-            "time": "2016-04-21T16:06:27+00:00"
+            "time": "2016-04-21 16:06:27"
         },
         {
             "name": "zendframework/zend-stdlib",
@@ -3278,7 +3279,7 @@
                 "stdlib",
                 "zf2"
             ],
-            "time": "2016-04-12T21:17:31+00:00"
+            "time": "2016-04-12 21:17:31"
         },
         {
             "name": "zendframework/zend-text",
@@ -3325,7 +3326,7 @@
                 "text",
                 "zf2"
             ],
-            "time": "2016-02-08T19:03:52+00:00"
+            "time": "2016-02-08 19:03:52"
         },
         {
             "name": "zendframework/zend-uri",
@@ -3372,7 +3373,7 @@
                 "uri",
                 "zf2"
             ],
-            "time": "2016-02-17T22:38:51+00:00"
+            "time": "2016-02-17 22:38:51"
         },
         {
             "name": "zendframework/zend-validator",
@@ -3443,7 +3444,7 @@
                 "validator",
                 "zf2"
             ],
-            "time": "2017-01-29T17:24:24+00:00"
+            "time": "2017-01-29 17:24:24"
         },
         {
             "name": "zendframework/zend-view",
@@ -3530,7 +3531,7 @@
                 "view",
                 "zf2"
             ],
-            "time": "2016-06-30T22:28:07+00:00"
+            "time": "2016-06-30 22:28:07"
         },
         {
             "name": "zendframework/zendrest",
@@ -3567,7 +3568,7 @@
                 "rest",
                 "zf2"
             ],
-            "time": "2014-03-05T22:32:09+00:00"
+            "time": "2014-03-05 22:32:09"
         },
         {
             "name": "zendframework/zendservice-amazon",
@@ -3624,7 +3625,7 @@
                 "sqs",
                 "zf2"
             ],
-            "time": "2015-06-04T19:47:46+00:00"
+            "time": "2015-06-04 19:47:46"
         },
         {
             "name": "zendframework/zendservice-recaptcha",
@@ -3676,7 +3677,7 @@
                 "recaptcha",
                 "zf2"
             ],
-            "time": "2017-02-09T21:38:25+00:00"
+            "time": "2017-02-09 21:38:25"
         },
         {
             "name": "zendframework/zendxml",
@@ -3721,7 +3722,7 @@
                 "xml",
                 "zf2"
             ],
-            "time": "2016-02-04T21:02:08+00:00"
+            "time": "2016-02-04 21:02:08"
         },
         {
             "name": "zf-commons/zfc-rbac",
@@ -3804,7 +3805,7 @@
                 "rbac",
                 "zf2"
             ],
-            "time": "2016-10-26T14:05:28+00:00"
+            "time": "2016-10-26 14:05:28"
         },
         {
             "name": "zfr/rbac",
@@ -3854,7 +3855,7 @@
                 "zf2",
                 "zf3"
             ],
-            "time": "2014-02-06T14:18:34+00:00"
+            "time": "2014-02-06 14:18:34"
         }
     ],
     "packages-dev": [
@@ -3914,7 +3915,7 @@
                 "testing",
                 "web"
             ],
-            "time": "2016-03-05T08:26:18+00:00"
+            "time": "2016-03-05 08:26:18"
         },
         {
             "name": "behat/mink-selenium2-driver",
@@ -3975,7 +3976,7 @@
                 "testing",
                 "webdriver"
             ],
-            "time": "2016-03-05T09:10:18+00:00"
+            "time": "2016-03-05 09:10:18"
         },
         {
             "name": "cilex/cilex",
@@ -4034,7 +4035,7 @@
                 "cli",
                 "microframework"
             ],
-            "time": "2014-03-29T14:03:13+00:00"
+            "time": "2014-03-29 14:03:13"
         },
         {
             "name": "cilex/console-service-provider",
@@ -4093,7 +4094,7 @@
                 "service-provider",
                 "silex"
             ],
-            "time": "2012-12-19T10:50:58+00:00"
+            "time": "2012-12-19 10:50:58"
         },
         {
             "name": "doctrine/annotations",
@@ -4161,7 +4162,7 @@
                 "docblock",
                 "parser"
             ],
-            "time": "2017-02-24T16:22:25+00:00"
+            "time": "2017-02-24 16:22:25"
         },
         {
             "name": "doctrine/instantiator",
@@ -4215,7 +4216,7 @@
                 "constructor",
                 "instantiate"
             ],
-            "time": "2015-06-14T21:17:01+00:00"
+            "time": "2015-06-14 21:17:01"
         },
         {
             "name": "doctrine/lexer",
@@ -4269,7 +4270,7 @@
                 "lexer",
                 "parser"
             ],
-            "time": "2014-09-09T13:34:57+00:00"
+            "time": "2014-09-09 13:34:57"
         },
         {
             "name": "erusev/parsedown",
@@ -4311,7 +4312,7 @@
                 "markdown",
                 "parser"
             ],
-            "time": "2016-11-02T15:56:58+00:00"
+            "time": "2016-11-02 15:56:58"
         },
         {
             "name": "friendsofphp/php-cs-fixer",
@@ -4369,7 +4370,7 @@
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
-            "time": "2016-07-22T06:46:28+00:00"
+            "time": "2016-07-22 06:46:28"
         },
         {
             "name": "herrera-io/json",
@@ -4430,7 +4431,7 @@
                 "validate"
             ],
             "abandoned": "kherge/json",
-            "time": "2013-10-30T16:51:34+00:00"
+            "time": "2013-10-30 16:51:34"
         },
         {
             "name": "herrera-io/phar-update",
@@ -4488,7 +4489,7 @@
                 "update"
             ],
             "abandoned": true,
-            "time": "2013-10-30T17:23:01+00:00"
+            "time": "2013-10-30 17:23:01"
         },
         {
             "name": "instaclick/php-webdriver",
@@ -4546,7 +4547,7 @@
                 "webdriver",
                 "webtest"
             ],
-            "time": "2015-06-15T20:19:33+00:00"
+            "time": "2015-06-15 20:19:33"
         },
         {
             "name": "jms/metadata",
@@ -4597,7 +4598,7 @@
                 "xml",
                 "yaml"
             ],
-            "time": "2016-12-05T10:18:33+00:00"
+            "time": "2016-12-05 10:18:33"
         },
         {
             "name": "jms/parser-lib",
@@ -4632,7 +4633,7 @@
                 "Apache2"
             ],
             "description": "A library for easily creating recursive-descent parsers.",
-            "time": "2012-11-18T18:08:43+00:00"
+            "time": "2012-11-18 18:08:43"
         },
         {
             "name": "jms/serializer",
@@ -4708,7 +4709,7 @@
                 "serialization",
                 "xml"
             ],
-            "time": "2017-02-14T14:35:22+00:00"
+            "time": "2017-02-14 14:35:22"
         },
         {
             "name": "justinrainbow/json-schema",
@@ -4774,7 +4775,7 @@
                 "json",
                 "schema"
             ],
-            "time": "2016-01-25T15:43:01+00:00"
+            "time": "2016-01-25 15:43:01"
         },
         {
             "name": "kherge/version",
@@ -4817,7 +4818,7 @@
             "description": "A parsing and comparison library for semantic versioning.",
             "homepage": "http://github.com/kherge/Version",
             "abandoned": true,
-            "time": "2012-08-16T17:13:03+00:00"
+            "time": "2012-08-16 17:13:03"
         },
         {
             "name": "monolog/monolog",
@@ -4895,7 +4896,49 @@
                 "logging",
                 "psr-3"
             ],
-            "time": "2016-11-26T00:15:39+00:00"
+            "time": "2016-11-26 00:15:39"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.6.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe",
+                "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "doctrine/collections": "1.*",
+                "phpunit/phpunit": "~4.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "homepage": "https://github.com/myclabs/DeepCopy",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "time": "2017-01-26 22:05:40"
         },
         {
             "name": "nikic/php-parser",
@@ -4940,7 +4983,7 @@
                 "parser",
                 "php"
             ],
-            "time": "2015-09-19T14:15:08+00:00"
+            "time": "2015-09-19 14:15:08"
         },
         {
             "name": "pdepend/pdepend",
@@ -4980,7 +5023,7 @@
                 "BSD-3-Clause"
             ],
             "description": "Official version of pdepend to be handled with Composer",
-            "time": "2017-01-19T14:23:36+00:00"
+            "time": "2017-01-19 14:23:36"
         },
         {
             "name": "phpcollection/phpcollection",
@@ -5028,7 +5071,7 @@
                 "sequence",
                 "set"
             ],
-            "time": "2015-05-17T12:39:23+00:00"
+            "time": "2015-05-17 12:39:23"
         },
         {
             "name": "phpdocumentor/fileset",
@@ -5071,7 +5114,7 @@
                 "fileset",
                 "phpdoc"
             ],
-            "time": "2013-08-06T21:07:42+00:00"
+            "time": "2013-08-06 21:07:42"
         },
         {
             "name": "phpdocumentor/graphviz",
@@ -5112,7 +5155,7 @@
                     "email": "mike.vanriel@naenius.com"
                 }
             ],
-            "time": "2016-02-02T13:00:08+00:00"
+            "time": "2016-02-02 13:00:08"
         },
         {
             "name": "phpdocumentor/phpdocumentor",
@@ -5201,7 +5244,7 @@
                 "documentation",
                 "phpdoc"
             ],
-            "time": "2016-05-22T09:50:56+00:00"
+            "time": "2016-05-22 09:50:56"
         },
         {
             "name": "phpdocumentor/reflection",
@@ -5255,7 +5298,7 @@
                 "reflection",
                 "static analysis"
             ],
-            "time": "2016-05-21T08:42:32+00:00"
+            "time": "2016-05-21 08:42:32"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
@@ -5304,7 +5347,7 @@
                     "email": "mike.vanriel@naenius.com"
                 }
             ],
-            "time": "2015-02-03T12:10:50+00:00"
+            "time": "2015-02-03 12:10:50"
         },
         {
             "name": "phploc/phploc",
@@ -5357,7 +5400,7 @@
             ],
             "description": "A tool for quickly measuring the size of a PHP project.",
             "homepage": "https://github.com/sebastianbergmann/phploc",
-            "time": "2016-04-25T08:11:21+00:00"
+            "time": "2016-04-25 08:11:21"
         },
         {
             "name": "phpmd/phpmd",
@@ -5423,7 +5466,7 @@
                 "phpmd",
                 "pmd"
             ],
-            "time": "2017-01-20T14:41:10+00:00"
+            "time": "2017-01-20 14:41:10"
         },
         {
             "name": "phpoption/phpoption",
@@ -5473,7 +5516,7 @@
                 "php",
                 "type"
             ],
-            "time": "2015-07-25T16:39:46+00:00"
+            "time": "2015-07-25 16:39:46"
         },
         {
             "name": "phpspec/prophecy",
@@ -5536,43 +5579,44 @@
                 "spy",
                 "stub"
             ],
-            "time": "2017-03-02T20:05:34+00:00"
+            "time": "2017-03-02 20:05:34"
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "2.2.4",
+            "version": "4.0.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
+                "reference": "09e2277d14ea467e5a984010f501343ef29ffc69"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
-                "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69",
+                "reference": "09e2277d14ea467e5a984010f501343ef29ffc69",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.3",
-                "phpunit/php-file-iterator": "~1.3",
-                "phpunit/php-text-template": "~1.2",
-                "phpunit/php-token-stream": "~1.3",
-                "sebastian/environment": "^1.3.2",
-                "sebastian/version": "~1.0"
+                "ext-dom": "*",
+                "ext-xmlwriter": "*",
+                "php": "^5.6 || ^7.0",
+                "phpunit/php-file-iterator": "^1.3",
+                "phpunit/php-text-template": "^1.2",
+                "phpunit/php-token-stream": "^1.4.2 || ^2.0",
+                "sebastian/code-unit-reverse-lookup": "^1.0",
+                "sebastian/environment": "^1.3.2 || ^2.0",
+                "sebastian/version": "^1.0 || ^2.0"
             },
             "require-dev": {
-                "ext-xdebug": ">=2.1.4",
-                "phpunit/phpunit": "~4"
+                "ext-xdebug": "^2.1.4",
+                "phpunit/phpunit": "^5.7"
             },
             "suggest": {
-                "ext-dom": "*",
-                "ext-xdebug": ">=2.2.1",
-                "ext-xmlwriter": "*"
+                "ext-xdebug": "^2.5.1"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2.x-dev"
+                    "dev-master": "4.0.x-dev"
                 }
             },
             "autoload": {
@@ -5598,7 +5642,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2015-10-06T15:47:00+00:00"
+            "time": "2017-03-01 09:12:17"
         },
         {
             "name": "phpunit/php-file-iterator",
@@ -5645,7 +5689,7 @@
                 "filesystem",
                 "iterator"
             ],
-            "time": "2016-10-03T07:40:28+00:00"
+            "time": "2016-10-03 07:40:28"
         },
         {
             "name": "phpunit/php-text-template",
@@ -5686,7 +5730,7 @@
             "keywords": [
                 "template"
             ],
-            "time": "2015-06-21T13:50:34+00:00"
+            "time": "2015-06-21 13:50:34"
         },
         {
             "name": "phpunit/php-timer",
@@ -5735,7 +5779,7 @@
             "keywords": [
                 "timer"
             ],
-            "time": "2017-02-26T11:10:40+00:00"
+            "time": "2017-02-26 11:10:40"
         },
         {
             "name": "phpunit/php-token-stream",
@@ -5784,44 +5828,54 @@
             "keywords": [
                 "tokenizer"
             ],
-            "time": "2017-02-27T10:12:30+00:00"
+            "time": "2017-02-27 10:12:30"
         },
         {
             "name": "phpunit/phpunit",
-            "version": "4.8.27",
+            "version": "5.7.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90"
+                "reference": "69f832b87c731d5cacad7f91948778fe98335fdd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90",
-                "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69f832b87c731d5cacad7f91948778fe98335fdd",
+                "reference": "69f832b87c731d5cacad7f91948778fe98335fdd",
                 "shasum": ""
             },
             "require": {
                 "ext-dom": "*",
                 "ext-json": "*",
-                "ext-pcre": "*",
-                "ext-reflection": "*",
-                "ext-spl": "*",
-                "php": ">=5.3.3",
-                "phpspec/prophecy": "^1.3.1",
-                "phpunit/php-code-coverage": "~2.1",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-xml": "*",
+                "myclabs/deep-copy": "~1.3",
+                "php": "^5.6 || ^7.0",
+                "phpspec/prophecy": "^1.6.2",
+                "phpunit/php-code-coverage": "^4.0.4",
                 "phpunit/php-file-iterator": "~1.4",
                 "phpunit/php-text-template": "~1.2",
                 "phpunit/php-timer": "^1.0.6",
-                "phpunit/phpunit-mock-objects": "~2.3",
-                "sebastian/comparator": "~1.1",
+                "phpunit/phpunit-mock-objects": "^3.2",
+                "sebastian/comparator": "~1.2.2",
                 "sebastian/diff": "~1.2",
-                "sebastian/environment": "~1.3",
-                "sebastian/exporter": "~1.2",
-                "sebastian/global-state": "~1.0",
-                "sebastian/version": "~1.0",
+                "sebastian/environment": "^1.3.4 || ^2.0",
+                "sebastian/exporter": "~2.0",
+                "sebastian/global-state": "^1.0 || ^2.0",
+                "sebastian/object-enumerator": "~2.0",
+                "sebastian/resource-operations": "~1.0",
+                "sebastian/version": "~1.0|~2.0",
                 "symfony/yaml": "~2.1|~3.0"
             },
+            "conflict": {
+                "phpdocumentor/reflection-docblock": "3.0.2"
+            },
+            "require-dev": {
+                "ext-pdo": "*"
+            },
             "suggest": {
+                "ext-xdebug": "*",
                 "phpunit/php-invoker": "~1.1"
             },
             "bin": [
@@ -5830,7 +5884,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "4.8.x-dev"
+                    "dev-master": "5.7.x-dev"
                 }
             },
             "autoload": {
@@ -5856,30 +5910,33 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2016-07-21T06:48:14+00:00"
+            "time": "2017-01-28 06:14:33"
         },
         {
             "name": "phpunit/phpunit-mock-objects",
-            "version": "2.3.8",
+            "version": "3.4.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
-                "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
+                "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
-                "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+                "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
                 "shasum": ""
             },
             "require": {
                 "doctrine/instantiator": "^1.0.2",
-                "php": ">=5.3.3",
-                "phpunit/php-text-template": "~1.2",
-                "sebastian/exporter": "~1.2"
+                "php": "^5.6 || ^7.0",
+                "phpunit/php-text-template": "^1.2",
+                "sebastian/exporter": "^1.2 || ^2.0"
+            },
+            "conflict": {
+                "phpunit/phpunit": "<5.4.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.4"
+                "phpunit/phpunit": "^5.4"
             },
             "suggest": {
                 "ext-soap": "*"
@@ -5887,7 +5944,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.3.x-dev"
+                    "dev-master": "3.2.x-dev"
                 }
             },
             "autoload": {
@@ -5912,7 +5969,7 @@
                 "mock",
                 "xunit"
             ],
-            "time": "2015-10-02T06:51:40+00:00"
+            "time": "2016-12-08 20:27:08"
         },
         {
             "name": "pimple/pimple",
@@ -5958,7 +6015,52 @@
                 "container",
                 "dependency injection"
             ],
-            "time": "2013-11-22T08:30:29+00:00"
+            "time": "2013-11-22 08:30:29"
+        },
+        {
+            "name": "sebastian/code-unit-reverse-lookup",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.7 || ^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Looks up which function or method a line of code belongs to",
+            "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+            "time": "2017-03-04 06:30:41"
         },
         {
             "name": "sebastian/comparator",
@@ -6022,7 +6124,7 @@
                 "compare",
                 "equality"
             ],
-            "time": "2017-01-29T09:50:25+00:00"
+            "time": "2017-01-29 09:50:25"
         },
         {
             "name": "sebastian/diff",
@@ -6074,32 +6176,32 @@
             "keywords": [
                 "diff"
             ],
-            "time": "2015-12-08T07:14:41+00:00"
+            "time": "2015-12-08 07:14:41"
         },
         {
             "name": "sebastian/environment",
-            "version": "1.3.8",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
+                "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
-                "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+                "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
                 "shasum": ""
             },
             "require": {
-                "php": "^5.3.3 || ^7.0"
+                "php": "^5.6 || ^7.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "^4.8 || ^5.0"
+                "phpunit/phpunit": "^5.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.3.x-dev"
+                    "dev-master": "2.0.x-dev"
                 }
             },
             "autoload": {
@@ -6124,25 +6226,25 @@
                 "environment",
                 "hhvm"
             ],
-            "time": "2016-08-18T05:49:44+00:00"
+            "time": "2016-11-26 07:53:53"
         },
         {
             "name": "sebastian/exporter",
-            "version": "1.2.2",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
+                "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
-                "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+                "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3",
-                "sebastian/recursion-context": "~1.0"
+                "sebastian/recursion-context": "~2.0"
             },
             "require-dev": {
                 "ext-mbstring": "*",
@@ -6151,7 +6253,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.3.x-dev"
+                    "dev-master": "2.0.x-dev"
                 }
             },
             "autoload": {
@@ -6191,7 +6293,7 @@
                 "export",
                 "exporter"
             ],
-            "time": "2016-06-17T09:04:28+00:00"
+            "time": "2016-11-19 08:54:04"
         },
         {
             "name": "sebastian/finder-facade",
@@ -6230,7 +6332,7 @@
             ],
             "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.",
             "homepage": "https://github.com/sebastianbergmann/finder-facade",
-            "time": "2016-02-17T07:02:23+00:00"
+            "time": "2016-02-17 07:02:23"
         },
         {
             "name": "sebastian/git",
@@ -6275,7 +6377,7 @@
             "keywords": [
                 "git"
             ],
-            "time": "2017-01-23T20:57:12+00:00"
+            "time": "2017-01-23 20:57:12"
         },
         {
             "name": "sebastian/global-state",
@@ -6326,7 +6428,53 @@
             "keywords": [
                 "global state"
             ],
-            "time": "2015-10-12T03:26:01+00:00"
+            "time": "2015-10-12 03:26:01"
+        },
+        {
+            "name": "sebastian/object-enumerator",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+                "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
+                "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6",
+                "sebastian/recursion-context": "~2.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+            "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+            "time": "2017-02-18 15:18:39"
         },
         {
             "name": "sebastian/phpcpd",
@@ -6377,20 +6525,20 @@
             ],
             "description": "Copy/Paste Detector (CPD) for PHP code.",
             "homepage": "https://github.com/sebastianbergmann/phpcpd",
-            "time": "2016-04-17T19:32:49+00:00"
+            "time": "2016-04-17 19:32:49"
         },
         {
             "name": "sebastian/recursion-context",
-            "version": "1.0.2",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/recursion-context.git",
-                "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
+                "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
-                "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+                "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
                 "shasum": ""
             },
             "require": {
@@ -6402,7 +6550,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
+                    "dev-master": "2.0.x-dev"
                 }
             },
             "autoload": {
@@ -6430,23 +6578,73 @@
             ],
             "description": "Provides functionality to recursively process PHP variables",
             "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
-            "time": "2015-11-11T19:50:13+00:00"
+            "time": "2016-11-19 07:33:16"
+        },
+        {
+            "name": "sebastian/resource-operations",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/resource-operations.git",
+                "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides a list of PHP built-in functions that operate on resources",
+            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+            "time": "2015-07-28 20:34:47"
         },
         {
             "name": "sebastian/version",
-            "version": "1.0.6",
+            "version": "2.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/version.git",
-                "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
-                "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
                 "shasum": ""
             },
+            "require": {
+                "php": ">=5.6"
+            },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
             "autoload": {
                 "classmap": [
                     "src/"
@@ -6465,7 +6663,7 @@
             ],
             "description": "Library that helps with managing the version number of Git-hosted PHP projects",
             "homepage": "https://github.com/sebastianbergmann/version",
-            "time": "2015-06-21T13:59:46+00:00"
+            "time": "2016-10-03 07:35:21"
         },
         {
             "name": "seld/jsonlint",
@@ -6514,7 +6712,7 @@
                 "parser",
                 "validator"
             ],
-            "time": "2017-03-06T16:42:24+00:00"
+            "time": "2017-03-06 16:42:24"
         },
         {
             "name": "squizlabs/php_codesniffer",
@@ -6592,7 +6790,7 @@
                 "phpcs",
                 "standards"
             ],
-            "time": "2017-02-02T03:30:00+00:00"
+            "time": "2017-02-02 03:30:00"
         },
         {
             "name": "symfony/config",
@@ -6648,7 +6846,7 @@
             ],
             "description": "Symfony Config Component",
             "homepage": "https://symfony.com",
-            "time": "2017-03-01T18:13:50+00:00"
+            "time": "2017-03-01 18:13:50"
         },
         {
             "name": "symfony/console",
@@ -6709,7 +6907,7 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
-            "time": "2017-03-04T11:00:12+00:00"
+            "time": "2017-03-04 11:00:12"
         },
         {
             "name": "symfony/css-selector",
@@ -6762,7 +6960,7 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
-            "time": "2017-01-02T20:32:22+00:00"
+            "time": "2017-01-02 20:32:22"
         },
         {
             "name": "symfony/debug",
@@ -6819,7 +7017,7 @@
             ],
             "description": "Symfony Debug Component",
             "homepage": "https://symfony.com",
-            "time": "2016-07-30T07:22:48+00:00"
+            "time": "2016-07-30 07:22:48"
         },
         {
             "name": "symfony/dependency-injection",
@@ -6882,7 +7080,7 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "time": "2017-02-16T22:46:52+00:00"
+            "time": "2017-02-16 22:46:52"
         },
         {
             "name": "symfony/event-dispatcher",
@@ -6942,7 +7140,7 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "time": "2017-02-21T08:33:48+00:00"
+            "time": "2017-02-21 08:33:48"
         },
         {
             "name": "symfony/filesystem",
@@ -6991,7 +7189,7 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
-            "time": "2016-07-20T05:43:46+00:00"
+            "time": "2016-07-20 05:43:46"
         },
         {
             "name": "symfony/finder",
@@ -7040,7 +7238,7 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
-            "time": "2017-02-21T08:33:48+00:00"
+            "time": "2017-02-21 08:33:48"
         },
         {
             "name": "symfony/polyfill-mbstring",
@@ -7099,7 +7297,7 @@
                 "portable",
                 "shim"
             ],
-            "time": "2016-11-14T01:06:16+00:00"
+            "time": "2016-11-14 01:06:16"
         },
         {
             "name": "symfony/process",
@@ -7148,7 +7346,7 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "time": "2017-03-04T12:20:59+00:00"
+            "time": "2017-03-04 12:20:59"
         },
         {
             "name": "symfony/stopwatch",
@@ -7197,7 +7395,7 @@
             ],
             "description": "Symfony Stopwatch Component",
             "homepage": "https://symfony.com",
-            "time": "2017-02-18T17:06:33+00:00"
+            "time": "2017-02-18 17:06:33"
         },
         {
             "name": "symfony/translation",
@@ -7261,7 +7459,7 @@
             ],
             "description": "Symfony Translation Component",
             "homepage": "https://symfony.com",
-            "time": "2016-07-30T07:22:48+00:00"
+            "time": "2016-07-30 07:22:48"
         },
         {
             "name": "symfony/validator",
@@ -7334,7 +7532,7 @@
             ],
             "description": "Symfony Validator Component",
             "homepage": "https://symfony.com",
-            "time": "2017-02-28T02:24:56+00:00"
+            "time": "2017-02-28 02:24:56"
         },
         {
             "name": "theseer/fdomdocument",
@@ -7374,7 +7572,7 @@
             ],
             "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.",
             "homepage": "https://github.com/theseer/fDOMDocument",
-            "time": "2015-05-27T22:58:02+00:00"
+            "time": "2015-05-27 22:58:02"
         },
         {
             "name": "twig/twig",
@@ -7435,7 +7633,7 @@
             "keywords": [
                 "templating"
             ],
-            "time": "2016-10-25T19:17:17+00:00"
+            "time": "2016-10-25 19:17:17"
         },
         {
             "name": "zetacomponents/base",
@@ -7498,7 +7696,7 @@
             ],
             "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.",
             "homepage": "https://github.com/zetacomponents",
-            "time": "2014-09-19T03:28:34+00:00"
+            "time": "2014-09-19 03:28:34"
         },
         {
             "name": "zetacomponents/document",
@@ -7549,7 +7747,7 @@
             ],
             "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.",
             "homepage": "https://github.com/zetacomponents",
-            "time": "2013-12-19T11:40:00+00:00"
+            "time": "2013-12-19 11:40:00"
         }
     ],
     "aliases": [],
diff --git a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php
index 643ee78b002..9a17aabd895 100644
--- a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php
+++ b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php
@@ -138,7 +138,7 @@ abstract class DbTestCase extends TestCase
             $this->addRowManager($sm);
             $sm->setService(
                 'VuFind\SessionManager',
-                $this->getMock('Zend\Session\SessionManager')
+                $this->createMock('Zend\Session\SessionManager')
             );
 
             // Override the configuration so PostgreSQL tests can work:
diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php
index dff552c2087..5309f1d70cb 100644
--- a/module/VuFind/src/VuFindTest/Unit/TestCase.php
+++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php
@@ -192,7 +192,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
                 'VuFind\SearchSpecsReader', new \VuFind\Config\SearchSpecsReader()
             );
             $this->serviceManager->setService(
-                'VuFind\Logger', $this->getMock('VuFind\Log\Logger')
+                'VuFind\Logger', $this->createMock('VuFind\Log\Logger')
             );
             $this->serviceManager->setService(
                 'VuFind\Http', new \VuFindHttp\HttpService()
diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php
index 5e4d8957072..4e5282a65a6 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php
@@ -76,10 +76,10 @@ class ILSTest extends \VuFindTest\Unit\DbTestCase
         if (!$this->continuousIntegrationRunning()) {
             return $this->markTestSkipped('Continuous integration not running.');
         }
-        $this->driver = $this->getMock('VuFind\ILS\Driver\Sample');
+        $this->driver = $this->createMock('VuFind\ILS\Driver\Sample');
         $driverManager = new \VuFind\ILS\Driver\PluginManager();
         $driverManager->setService('Sample', $this->driver);
-        $mockConfigReader = $this->getMock('VuFind\Config\PluginManager');
+        $mockConfigReader = $this->createMock('VuFind\Config\PluginManager');
         $mockConfigReader->expects($this->any())->method('get')
             ->will($this->returnValue(new \Zend\Config\Config([])));
         $this->auth = new \VuFind\Auth\ILS(
diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php
index 294d7165cc6..2562efd8b58 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php
@@ -76,7 +76,7 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase
         if (null === $config) {
             $config = $this->getAuthConfig();
         }
-        $obj = new Shibboleth($this->getMock('Zend\Session\ManagerInterface'));
+        $obj = new Shibboleth($this->createMock('Zend\Session\ManagerInterface'));
         \VuFind\ServiceManager\Initializer::initInstance(
             $obj, $this->getServiceManager()
         );
diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php
index f8b754ead54..4ca952a9cc6 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/View/Helper/Root/ResultFeedTest.php
@@ -59,22 +59,23 @@ class ResultFeedTest extends \VuFindTest\Unit\ViewHelperTestCase
      */
     protected function getPlugins()
     {
-        $currentPath = $this->getMock('VuFind\View\Helper\Root\CurrentPath');
+        $currentPath = $this->createMock('VuFind\View\Helper\Root\CurrentPath');
         $currentPath->expects($this->any())->method('__invoke')
             ->will($this->returnValue('/test/path'));
 
-        $recordLink = $this->getMock(
-            'VuFind\View\Helper\Root\RecordLink', [],
-            [new \VuFind\Record\Router(
-                $this->getServiceManager()->get('VuFind\RecordLoader'),
-                new \Zend\Config\Config([])
-            )
-            ]
-        );
+        $recordLink = $this->getMockBuilder('VuFind\View\Helper\Root\RecordLink')
+            ->setConstructorArgs(
+                [
+                    new \VuFind\Record\Router(
+                        $this->getServiceManager()->get('VuFind\RecordLoader'),
+                        new \Zend\Config\Config([])
+                    )
+                ]
+            )->getMock();
         $recordLink->expects($this->any())->method('getUrl')
             ->will($this->returnValue('test/url'));
 
-        $serverUrl = $this->getMock('Zend\View\Helper\ServerUrl');
+        $serverUrl = $this->createMock('Zend\View\Helper\ServerUrl');
         $serverUrl->expects($this->any())->method('__invoke')
             ->will($this->returnValue('http://server/url'));
 
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php
index 8f85a97d747..faaad67f294 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/DatabaseUnitTest.php
@@ -232,8 +232,8 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
     protected function getRequest($post = [])
     {
         $post = new Parameters($post);
-        $request
-            = $this->getMock('Zend\Http\PhpEnvironment\Request', ['getPost']);
+        $request = $this->getMockBuilder('Zend\Http\PhpEnvironment\Request')
+            ->setMethods(['getPost'])->getMock();
         $request->expects($this->any())->method('getPost')
             ->will($this->returnValue($post));
         return $request;
@@ -248,8 +248,8 @@ class DatabaseUnitTest extends \VuFindTest\Unit\DbTestCase
      */
     protected function getDatabase($table)
     {
-        $tableManager
-            = $this->getMock('VuFind\Db\Table\PluginManager', ['get']);
+        $tableManager = $this->getMockBuilder('VuFind\Db\Table\PluginManager')
+            ->setMethods(['get'])->getMock();
         $tableManager->expects($this->once())->method('get')
             ->with($this->equalTo('User'))
             ->will($this->returnValue($table));
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php
index ae1b58bbd0e..0ba75894d6b 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Autocomplete/TagTest.php
@@ -72,8 +72,8 @@ class TagTest extends \VuFindTest\Unit\DbTestCase
         $tagTable->expects($this->once())->method('matchText')
             ->with($this->equalTo('foo'))
             ->will($this->returnValue($tags));
-        $tableManager
-            = $this->getMock('VuFind\Db\Table\PluginManager', ['get']);
+        $tableManager = $this->getMockBuilder('VuFind\Db\Table\PluginManager')
+            ->setMethods(['get'])->getMock();
         $tableManager->expects($this->once())->method('get')
             ->with($this->equalTo('Tags'))
             ->will($this->returnValue($tagTable));
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php
index 87473d32250..cbfc99e7775 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/CartTest.php
@@ -53,13 +53,12 @@ class CartTest extends \PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
-        $this->loader = $this->getMock(
-            'VuFind\Record\Loader', [],
-            [
-                $this->getMock('VuFindSearch\Service'),
-                $this->getMock('VuFind\RecordDriver\PluginManager')
-            ]
-        );
+        $this->loader = $this->getMockBuilder('VuFind\Record\Loader')
+            ->setMethods([])
+            ->setConstructorArgs([
+                $this->createMock('VuFindSearch\Service'),
+                $this->createMock('VuFind\RecordDriver\PluginManager')
+            ])->getMock();
     }
 
     /**
@@ -75,10 +74,10 @@ class CartTest extends \PHPUnit_Framework_TestCase
     protected function getMockCookieManager($cookies = [], $path = '/',
         $domain = null, $secure = false
     ) {
-        return $this->getMock(
-            'VuFind\Cookie\CookieManager', ['set'],
-            [$cookies, $path, $domain, $secure]
-        );
+        return $this->getMockBuilder('VuFind\Cookie\CookieManager')
+            ->setMethods(['set'])
+            ->setConstructorArgs([$cookies, $path, $domain, $secure])
+            ->getMock();
     }
 
     /**
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php
index 1e1d4b742f1..6dc109e172a 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/PluginFactoryTest.php
@@ -118,7 +118,7 @@ class PluginFactoryTest extends \VuFindTest\Unit\TestCase
     protected function getConfig($name)
     {
         return $this->factory->createServiceWithName(
-            $this->getMock('Zend\ServiceManager\ServiceLocatorInterface'),
+            $this->createMock('Zend\ServiceManager\ServiceLocatorInterface'),
             $name, $name
         );
     }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php
index a65e99dcd44..73a52f41b72 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Content/Covers/AmazonTest.php
@@ -107,10 +107,10 @@ class AmazonTest extends \PHPUnit_Framework_TestCase
      */
     protected function getUrl($size, $isbn = '0739313126', $throw = false)
     {
-        $amazon = $this->getMock(
-            'VuFind\Content\Covers\Amazon', ['getAmazonService'],
-            ['fake', 'fakesecret']
-        );
+        $amazon = $this->getMockBuilder(__NAMESPACE__ . '\CoverAmazonMock')
+            ->setMethods(['getAmazonService'])
+            ->setConstructorArgs(['fake', 'fakesecret'])
+            ->getMock();
         $params = [];
         if (!empty($isbn)) {
             $behavior = $throw
@@ -134,10 +134,10 @@ class AmazonTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFakeService($isbn, $expectedBehavior)
     {
-        $service = $this->getMock(
-            'ZendService\Amazon\Amazon', ['itemLookup'],
-            ['fakekey', 'US', 'fakesecret']
-        );
+        $service = $this->getMockBuilder(__NAMESPACE__ . '\ZendAmazonMock')
+            ->setMethods(['itemLookup'])
+            ->setConstructorArgs(['fakekey', 'US', 'fakesecret'])
+            ->getMock();
         if (!empty($isbn)) {
             $service->expects($this->once())
                 ->method('itemLookup')
@@ -158,3 +158,17 @@ class AmazonTest extends \PHPUnit_Framework_TestCase
         return unserialize(file_get_contents($file));
     }
 }
+
+class CoverAmazonMock extends \VuFind\Content\Covers\Amazon
+{
+    public function getAmazonService($key)
+    {
+    }
+}
+
+class ZendAmazonMock extends \ZendService\Amazon\Amazon
+{
+    public function itemLookup($asin, array $options = [])
+    {
+    }
+}
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php
index 1230be51ba1..b806f5dc148 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php
@@ -50,7 +50,7 @@ class NewItemsTest extends TestCase
      */
     public function testGetBibIDsFromCatalog()
     {
-        $flash = $this->getMock('Zend\Mvc\Controller\Plugin\FlashMessenger');
+        $flash = $this->createMock('Zend\Mvc\Controller\Plugin\FlashMessenger');
         $config = new Config(['result_pages' => 10]);
         $newItems = new NewItems($config);
         $bibs = $newItems->getBibIDsFromCatalog(
@@ -66,7 +66,7 @@ class NewItemsTest extends TestCase
      */
     public function testGetBibIDsFromCatalogWithIDLimit()
     {
-        $flash = $this->getMock('Zend\Mvc\Controller\Plugin\FlashMessenger');
+        $flash = $this->createMock('Zend\Mvc\Controller\Plugin\FlashMessenger');
         $flash->expects($this->once())->method('addMessage')
             ->with($this->equalTo('too_many_new_items'), $this->equalTo('info'));
         $config = new Config(['result_pages' => 10]);
@@ -84,10 +84,10 @@ class NewItemsTest extends TestCase
      */
     public function testGetFundList()
     {
-        $catalog = $this->getMock(
-            'VuFind\ILS\Connection', ['checkCapability', 'getFunds'],
-            [], '', false
-        );
+        $catalog = $this->getMockBuilder(__NAMESPACE__ . '\MockILSConnection')
+            ->setMethods(['checkCapability', 'getFunds'])
+            ->disableOriginalConstructor()
+            ->getMock();
         $catalog->expects($this->once())->method('checkCapability')
             ->with($this->equalTo('getFunds'))->will($this->returnValue(true));
         $catalog->expects($this->once())->method('getFunds')
@@ -209,9 +209,10 @@ class NewItemsTest extends TestCase
      */
     protected function getMockCatalog()
     {
-        $catalog = $this->getMock(
-            'VuFind\ILS\Connection', ['getNewItems'], [], '', false
-        );
+        $catalog = $this->getMockBuilder(__NAMESPACE__ . '\MockILSConnection')
+            ->setMethods(['getNewItems'])
+            ->disableOriginalConstructor()
+            ->getMock();
         $catalog->expects($this->once())->method('getNewItems')
             ->with(
                 $this->equalTo(1), $this->equalTo(200),
@@ -234,8 +235,8 @@ class NewItemsTest extends TestCase
      */
     protected function getMockParams($idLimit = 1024)
     {
-        $params = $this
-            ->getMock('VuFind\Search\Solr\Params', [], [], '', false);
+        $params = $this->getMockBuilder('VuFind\Search\Solr\Params')
+            ->disableOriginalConstructor()->getMock();
         $params->expects($this->once())->method('getLimit')
             ->will($this->returnValue(20));
         $params->expects($this->once())->method('getQueryIDLimit')
@@ -243,3 +244,14 @@ class NewItemsTest extends TestCase
         return $params;
     }
 }
+
+class MockILSConnection extends \VuFind\ILS\Connection
+{
+    public function getFunds()
+    {
+    }
+
+    public function getNewItems()
+    {
+    }
+}
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php
index 6d51a0ab5ef..5b509546d30 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php
@@ -357,18 +357,50 @@ class ResultScrollerTest extends TestCase
      *
      * @return ResultScroller
      */
-    protected function getMockResultScroller($results = null,
-        $methods = ['restoreLastSearch', 'rememberSearch']
-    ) {
+    protected function getMockResultScroller($results) {
         $mockManager = $this->getMockBuilder('VuFind\Search\Results\PluginManager')
             ->disableOriginalConstructor()->getMock();
-        $mock = $this->getMock(
-            'VuFind\Controller\Plugin\ResultScroller', $methods,
-            [new Container('test'), $mockManager]
-        );
-        if (in_array('restoreLastSearch', $methods) && null !== $results) {
-            $mock->expects($this->any())->method('restoreLastSearch')->will($this->returnValue($results));
-        }
-        return $mock;
+        return new ResultScrollerMock($mockManager, $results);
+    }
+}
+
+/**
+ * Mock class to stub search results
+ */
+class ResultScrollerMock extends \VuFind\Controller\Plugin\ResultScroller
+{
+    /**
+     * Search results to return
+     *
+     * @var \VuFind\Search\Base\Results
+     */
+    protected $testResults;
+
+    public function __construct($mockManager, $testResults)
+    {
+        parent::__construct(new Container('test'), $mockManager);
+        $this->testResults = $testResults;
+    }
+
+    /**
+     * Stubbed
+     *
+     * @return \VuFind\Search\Base\Results
+     */
+    protected function restoreLastSearch()
+    {
+        return $this->testResults;
+    }
+
+    /**
+     * Stubbed
+     *
+     * @param \VuFind\Search\Base\Results $search Search object to remember.
+     *
+     * @return void
+     */
+    protected function rememberSearch($search)
+    {
+        return null;
     }
 }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php
index 0eb78029557..2dbb5a0b7bd 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php
@@ -59,7 +59,8 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
      */
     public function testUtterFailure()
     {
-        $theme = $this->getMock('VuFindTheme\ThemeInfo', [], ['foo', 'bar']);
+        $theme = $this->getMockBuilder('VuFindTheme\ThemeInfo')
+            ->setConstructorArgs(['foo', 'bar'])->getMock();
         $theme->expects($this->once())->method('findContainingTheme')->with($this->equalTo(['images/noCover2.gif']))->will($this->returnValue(false));
         $loader = $this->getLoader([], null, $theme);
         $loader->getImage();
@@ -135,13 +136,13 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
      * @param \Zend\Http\Client                    $client  HTTP client (null to create TestAdapter)
      * @param array|bool                           $mock    Array of functions to mock, or false for real object
      *
-     * @return void
+     * @return Loader
      */
     protected function getLoader($config = [], $manager = null, $theme = null, $client = null, $mock = false)
     {
         $config = new Config($config);
         if (null === $manager) {
-            $manager = $this->getMock('VuFind\Content\Covers\PluginManager');
+            $manager = $this->createMock('VuFind\Content\Covers\PluginManager');
         }
         if (null === $theme) {
             $theme = new ThemeInfo($this->getThemeDir(), $this->testTheme);
@@ -152,7 +153,10 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
             $client->setAdapter($adapter);
         }
         if ($mock) {
-            return $this->getMock('VuFind\Cover\Loader', $mock, [$config, $manager, $theme, $client]);
+            return $this->getMockBuilder(__NAMESPACE__ . '\MockLoader')
+                ->setMethods($mock)
+                ->setConstructorArgs([$config, $manager, $theme, $client])
+                ->getMock();
         }
         return new Loader($config, $manager, $theme, $client);
     }
@@ -167,3 +171,10 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
         return realpath(__DIR__ . '/../../../../../../../themes');
     }
 }
+
+class MockLoader extends \VuFind\Cover\Loader
+{
+    public function debug($msg, array $context = [], $prependClass = true)
+    {
+    }
+}
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php
index 46223719c98..ffacb524212 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php
@@ -56,7 +56,7 @@ class DemoTest extends \VuFindTest\Unit\TestCase
         $session = $this->getMockBuilder('Zend\Session\Container')
             ->disableOriginalConstructor()->getMock();
         $this->driver = new Demo(
-            new \VuFind\Date\Converter(), $this->getMock('VuFindSearch\Service'),
+            new \VuFind\Date\Converter(), $this->createMock('VuFindSearch\Service'),
             function () use ($session) { return $session; }
         );
         $this->driver->init();
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php
index a272dfad274..63faa7a4df0 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php
@@ -81,7 +81,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
         $writer = new \Zend\Log\Writer\Mock();
         $logger->addWriter($writer);
 
-        $mockPM = $this->getMock('\VuFind\Config\PluginManager');
+        $mockPM = $this->createMock('\VuFind\Config\PluginManager');
         $mockPM->expects($this->any())
             ->method('get')
             ->will(
@@ -199,7 +199,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
         $this->assertEquals($configData, $val);
 
         $config = new \Zend\Config\Config($configData);
-        $mockPM = $this->getMock('\VuFind\Config\PluginManager');
+        $mockPM = $this->createMock('\VuFind\Config\PluginManager');
         $mockPM->expects($this->any())
             ->method('get')
             ->will(
@@ -2330,7 +2330,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
     {
         $configData = ['config' => 'values'];
         $config = new \Zend\Config\Config($configData);
-        $mockPM = $this->getMock('\VuFind\Config\PluginManager');
+        $mockPM = $this->createMock('\VuFind\Config\PluginManager');
         $mockPM->expects($this->any())
             ->method('get')
             ->will($this->returnValue($config));
@@ -2349,14 +2349,14 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
     {
         $cat_username = $instance ? $instance . '.' . $username : $username;
         return [
-                    'id' => 1,
-                    'firstname' => 'JANE',
-                    'lastname' => 'DOE',
-                    'cat_username' => $cat_username,
-                    'cat_password' => 'password',
-                    'email' => '',
-                    'major' => '',
-                    'college' => ''
+            'id' => 1,
+            'firstname' => 'JANE',
+            'lastname' => 'DOE',
+            'cat_username' => $cat_username,
+            'cat_password' => 'password',
+            'email' => '',
+            'major' => '',
+            'college' => ''
         ];
     }
 
@@ -2391,14 +2391,15 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
     {
         $session = $this->getMockBuilder('Zend\Session\Container')
             ->disableOriginalConstructor()->getMock();
-        return $this->getMock(
-            "VuFind\ILS\Driver\Demo", $methods,
-            [
-                new \VuFind\Date\Converter(),
-                $this->getMock('VuFindSearch\Service'),
-                function () use ($session) { return $session; }
-            ]
-        );
+        return $this->getMockBuilder(__NAMESPACE__ . '\DemoMock')
+            ->setMethods($methods)
+            ->setConstructorArgs(
+                [
+                    new \VuFind\Date\Converter(),
+                    $this->createMock('VuFindSearch\Service'),
+                    function () use ($session) { return $session; }
+                ]
+            )->getMock();
     }
 
     /**
@@ -2416,21 +2417,27 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
             if ($type == 'Demo') {
                 $mock = $this->getMockDemoDriver($methods);
             } else {
-                $mock = $this->getMock(
-                    "VuFind\ILS\Driver\\$type", $methods,
-                    [new \VuFind\Date\Converter()]
-                );
+                $mock = $this->getMockBuilder(__NAMESPACE__ . '\\' . $type . 'Mock')
+                    ->setMethods($methods)
+                    ->setConstructorArgs([new \VuFind\Date\Converter()])
+                    ->getMock();
             }
         } catch(\Exception $e) {
-            $mock = $this->getMock(
-                "VuFind\ILS\Driver\\$type", $methods
-            );
+            $mock = $this->getMockBuilder(__NAMESPACE__ . '\\' . $type . 'Mock')
+                ->setMethods($methods)->getMock();
         }
         if ($methods && in_array('init', $methods)) {
             $mock->expects($this->any())
                 ->method('init')
                 ->will($this->returnValue(null));
         }
+        if ($methods && in_array('supportsMethod', $methods)) {
+            $mock = $this
+                ->getMockBuilder(__NAMESPACE__ . '\\' . $type . 'NoSupportMock')
+                ->setMethods($methods)
+                ->setConstructorArgs([new \VuFind\Date\Converter()])
+                ->getMock();
+        }
         $mock->setConfig(['dummy_config' => true]);
         return $mock;
     }
@@ -2528,3 +2535,92 @@ class DummyILS extends \VuFind\ILS\Driver\AbstractBase
         return [];
     }
 }
+
+trait ILSMockTrait
+{
+    public function cancelHolds($cancelDetails)
+    {
+    }
+    public function cancelILLRequests($cancelDetails)
+    {
+    }
+    public function cancelStorageRetrievalRequests($cancelDetails)
+    {
+    }
+    public function checkRequestIsValid($id, $data, $patron)
+    {
+    }
+    public function checkILLRequestIsValid($id, $data, $patron)
+    {
+    }
+    public function checkStorageRetrievalRequestIsValid($id, $data, $patron)
+    {
+    }
+    public function getCancelHoldDetails($holdDetails)
+    {
+    }
+    public function getCancelILLRequestDetails($holdDetails)
+    {
+    }
+    public function getCancelStorageRetrievalRequestDetails($holdDetails)
+    {
+    }
+    public function getConfig($function, $params = null)
+    {
+    }
+    public function getDefaultPickUpLocation($patron = false, $holdDetails = null)
+    {
+    }
+    public function getDefaultRequestGroup($patron = false, $holdDetails = null)
+    {
+    }
+    public function getMyILLRequests($patron)
+    {
+    }
+    public function getILLPickUpLibraries($patron = false, $holdDetails = null)
+    {
+    }
+    public function getILLPickUpLocations($id, $pickupLib, $patron)
+    {
+    }
+    public function getPickUpLocations($patron = false, $holdDetails = null)
+    {
+    }
+    public function getRenewDetails($checkoutDetails)
+    {
+    }
+    public function getRequestGroups($bibId = null, $patron = null, $holdDetails = null)
+    {
+    }
+    public function placeHold($holdDetails)
+    {
+    }
+    public function placeILLRequest($holdDetails)
+    {
+    }
+    public function placeStorageRetrievalRequest($details)
+    {
+    }
+    public function renewMyItems($renewDetails)
+    {
+    }
+}
+class DemoMock extends \VuFind\ILS\Driver\Demo
+{
+    use ILSMockTrait;
+}
+class VoyagerMock extends \VuFind\ILS\Driver\Voyager
+{
+    use ILSMockTrait;
+}
+class VoyagerNoSupportMock extends \VuFind\ILS\Driver\Voyager
+{
+    use ILSMockTrait;
+    public function supportsMethod(...$args) {
+        return false;
+    }
+}
+class UnicornMock extends \VuFind\ILS\Driver\Unicorn
+{
+    use ILSMockTrait;
+}
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/NoILSTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/NoILSTest.php
index 584b47e7d05..6f33ccbed56 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/NoILSTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/NoILSTest.php
@@ -60,13 +60,13 @@ class NoILSTest extends \VuFindTest\Unit\TestCase
      */
     public function setUp()
     {
-        $this->loader = $this->getMock(
-            'VuFind\Record\Loader', [],
-            [
-                $this->getMock('VuFindSearch\Service'),
-                $this->getMock('VuFind\RecordDriver\PluginManager')
-            ]
-        );
+        $this->loader = $this->getMockBuilder('VuFind\Record\Loader')
+            ->setConstructorArgs(
+                [
+                    $this->createMock('VuFindSearch\Service'),
+                    $this->createMock('VuFind\RecordDriver\PluginManager')
+                ]
+            )->getMock();
         $this->driver = new NoILS($this->loader);
         $this->driver->init();
     }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Log/LoggerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Log/LoggerTest.php
index 76e765994dc..44925b4fbd9 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Log/LoggerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Log/LoggerTest.php
@@ -77,7 +77,9 @@ CONTEXT;
                 && false !== strpos($a[5], 'function =')
                 && count($a) == 5;
         };
-        $logger = $this->getMock('VuFind\Log\Logger', ['log']);
+        $logger = $this->getMockBuilder('VuFind\Log\Logger')
+            ->setMethods(['log'])
+            ->getMock();
         $logger->expects($this->once())->method('log')->with($this->equalTo(Logger::CRIT), $this->callback($callback));
         try {
             throw new \Exception('test');
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php
index 0d7319b426a..5ec74e6fa07 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php
@@ -54,7 +54,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && 'body' == $message->getBody()
                 && 'subject' == $message->getSubject();
         };
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->with($this->callback($callback));
         $mailer = new Mailer($transport);
         $mailer->send('to@example.com', 'from@example.com', 'subject', 'body');
@@ -74,7 +74,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && 'body' == $message->getBody()
                 && 'subject' == $message->getSubject();
         };
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->with($this->callback($callback));
         $address = new Address('from@example.com', 'Sender TextName');
         $mailer = new Mailer($transport);
@@ -95,7 +95,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && 'body' == $message->getBody()
                 && 'subject' == $message->getSubject();
         };
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->with($this->callback($callback));
         $address = new Address('to@example.com', 'Recipient TextName');
         $mailer = new Mailer($transport);
@@ -116,7 +116,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && 'body' == $message->getBody()
                 && 'subject' == $message->getSubject();
         };
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->with($this->callback($callback));
         $list = new AddressList();
         $list->add(new Address('to@example.com', 'Recipient TextName'));
@@ -134,7 +134,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testBadTo()
     {
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $mailer = new Mailer($transport);
         $mailer->send('bad@bad', 'from@example.com', 'subject', 'body');
     }
@@ -149,7 +149,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testEmptyTo()
     {
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $mailer = new Mailer($transport);
         $mailer->send('', 'from@example.com', 'subject', 'body');
     }
@@ -164,7 +164,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testTooManyRecipients()
     {
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $mailer = new Mailer($transport);
         $mailer->send('one@test.com;two@test.com', 'from@example.com', 'subject', 'body');
     }
@@ -179,7 +179,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testBadFrom()
     {
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $mailer = new Mailer($transport);
         $mailer->send('to@example.com', 'bad@bad', 'subject', 'body');
     }
@@ -194,7 +194,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testBadFromInAddressObject()
     {
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $mailer = new Mailer($transport);
         $mailer->send('to@example.com', new Address('bad@bad'), 'subject', 'body');
     }
@@ -209,7 +209,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testTransportException()
     {
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->will($this->throwException(new \Exception('Boom')));
         $mailer = new Mailer($transport);
         $mailer->send('to@example.com', 'from@example.com', 'subject', 'body');
@@ -228,7 +228,8 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && $in['from'] == 'from@example.com'
                 && $in['message'] == 'message';
         };
-        $view = $this->getMock('Zend\View\Renderer\PhpRenderer', ['partial']);
+        $view = $this->getMockBuilder(__NAMESPACE__ . '\MockEmailRenderer')
+            ->setMethods(['partial'])->getMock();
         $view->expects($this->once())->method('partial')
             ->with($this->equalTo('Email/share-link.phtml'), $this->callback($viewCallback))
             ->will($this->returnValue('body'));
@@ -243,7 +244,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && 'body' == $message->getBody()
                 && 'Library Catalog Search Result' == $message->getSubject();
         };
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->with($this->callback($callback));
         $mailer = new Mailer($transport);
         $mailer->setMaxRecipients(2);
@@ -260,7 +261,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
      */
     public function testSendRecord()
     {
-        $driver = $this->getMock('VuFind\RecordDriver\AbstractBase');
+        $driver = $this->createMock('VuFind\RecordDriver\AbstractBase');
         $driver->expects($this->once())->method('getBreadcrumb')->will($this->returnValue('breadcrumb'));
 
         $viewCallback = function ($in) use ($driver) {
@@ -269,7 +270,8 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && $in['from'] == 'from@example.com'
                 && $in['message'] == 'message';
         };
-        $view = $this->getMock('Zend\View\Renderer\PhpRenderer', ['partial']);
+        $view = $this->getMockBuilder(__NAMESPACE__ . '\MockEmailRenderer')
+            ->setMethods(['partial'])->getMock();
         $view->expects($this->once())->method('partial')
             ->with($this->equalTo('Email/record.phtml'), $this->callback($viewCallback))
             ->will($this->returnValue('body'));
@@ -280,9 +282,15 @@ class MailerTest extends \VuFindTest\Unit\TestCase
                 && 'body' == $message->getBody()
                 && 'Library Catalog Record: breadcrumb' == $message->getSubject();
         };
-        $transport = $this->getMock('Zend\Mail\Transport\TransportInterface');
+        $transport = $this->createMock('Zend\Mail\Transport\TransportInterface');
         $transport->expects($this->once())->method('send')->with($this->callback($callback));
         $mailer = new Mailer($transport);
         $mailer->sendRecord('to@example.com', 'from@example.com', 'message', $driver, $view);
     }
 }
+
+class MockEmailRenderer extends \Zend\View\Renderer\PhpRenderer
+{
+    public function partial($template, $driver) {
+    }
+}
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php
index 737e0d3e865..932a65e24cf 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/QRCode/LoaderTest.php
@@ -58,7 +58,8 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
      */
     public function testUtterFailure()
     {
-        $theme = $this->getMock('VuFindTheme\ThemeInfo', [], ['foo', 'bar']);
+        $theme = $this->getMockBuilder('VuFindTheme\ThemeInfo')
+            ->setConstructorArgs(['foo', 'bar'])->getMock();
         $theme->expects($this->once())->method('findContainingTheme')->with($this->equalTo(['images/noQRCode.gif']))->will($this->returnValue(false));
         $loader = $this->getLoader([], $theme);
         $loader->getImage();
@@ -93,7 +94,10 @@ class LoaderTest extends \VuFindTest\Unit\TestCase
             $theme = new ThemeInfo($this->getThemeDir(), $this->testTheme);
         }
         if ($mock) {
-            return $this->getMock('VuFind\QRCode\Loader', $mock, [$config, $theme]);
+            return $this->getMockBuilder('VuFind\QRCode\Loader')
+                ->setMethods($mock)
+                ->setConstructorArgs([$config, $theme])
+                ->getMock();
         }
         return new Loader($config, $theme);
     }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php
index df7e823d363..27486bcee97 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/RandomRecommendTest.php
@@ -50,8 +50,8 @@ class RandomRecommendTest extends TestCase
     public function setup()
     {
         $this->recommend = new Random(
-            $this->getMock('VuFindSearch\Service'),
-            $this->getMock('VuFind\Search\Params\PluginManager')
+            $this->createMock('VuFindSearch\Service'),
+            $this->createMock('VuFind\Search\Params\PluginManager')
         );
     }
 
@@ -144,8 +144,8 @@ class RandomRecommendTest extends TestCase
      */
     public function testCanInitialise()
     {
-        $service = $this->getMock('VuFindSearch\Service');
-        $paramManager = $this->getMock('VuFind\Search\Params\PluginManager');
+        $service = $this->createMock('VuFindSearch\Service');
+        $paramManager = $this->createMock('VuFind\Search\Params\PluginManager');
         $recommend = new Random($service, $paramManager);
 
         // Use Solr since some Base components are abstract:
@@ -153,14 +153,14 @@ class RandomRecommendTest extends TestCase
             ->get('Solr');
         $query = $this->getFixture('query');
         $params->setBasicSearch($query->getString(), $query->getHandler());
-        $request = $this->getMock('\Zend\StdLib\Parameters');
+        $request = $this->createMock('\Zend\StdLib\Parameters');
 
         $service->expects($this->once())->method('random')
             ->with(
                 $this->equalTo("Solr"),
                 $this->equalTo($params->getQuery()),
                 $this->equalTo(10)
-            )->will($this->returnValue($this->getMock('VuFindSearch\Response\RecordCollectionInterface')));
+            )->will($this->returnValue($this->createMock('VuFindSearch\Response\RecordCollectionInterface')));
 
         $recommend->setConfig("Solr:10:mixed:retain:20:facet1:value1:facet2:value2");
         $recommend->init($params, $request);
@@ -173,8 +173,8 @@ class RandomRecommendTest extends TestCase
      */
     public function testCanInitialiseInDisregardMode()
     {
-        $service = $this->getMock('VuFindSearch\Service');
-        $paramManager = $this->getMock('VuFind\Search\Params\PluginManager');
+        $service = $this->createMock('VuFindSearch\Service');
+        $paramManager = $this->createMock('VuFind\Search\Params\PluginManager');
         $recommend = new Random($service, $paramManager);
 
         $paramManager->expects($this->once())->method('get')
@@ -191,11 +191,11 @@ class RandomRecommendTest extends TestCase
             ->get('Solr');
         $query = $this->getFixture('query');
         $params->setBasicSearch($query->getString(), $query->getHandler());
-        $request = $this->getMock('\Zend\StdLib\Parameters');
+        $request = $this->createMock('\Zend\StdLib\Parameters');
 
         $service->expects($this->once())->method('random')
             ->with($this->equalTo("Solr"))
-            ->will($this->returnValue($this->getMock('VuFindSearch\Response\RecordCollectionInterface')));
+            ->will($this->returnValue($this->createMock('VuFindSearch\Response\RecordCollectionInterface')));
 
         $recommend->setConfig("Solr:10:mixed:disregard:20:facet1:value1:facet2:value2");
         $recommend->init($params, $request);
@@ -208,8 +208,8 @@ class RandomRecommendTest extends TestCase
      */
     public function testWillReturnEmptyForMinimumResultLimit()
     {
-        $service = $this->getMock('VuFindSearch\Service');
-        $paramManager = $this->getMock('VuFind\Search\Params\PluginManager');
+        $service = $this->createMock('VuFindSearch\Service');
+        $paramManager = $this->createMock('VuFind\Search\Params\PluginManager');
         $recommend = new Random($service, $paramManager);
         $records = ["1", "2", "3", "4", "5"];
 
@@ -219,9 +219,9 @@ class RandomRecommendTest extends TestCase
         $params = $results->getParams();
         $query = $this->getFixture('query');
         $params->setBasicSearch($query->getString(), $query->getHandler());
-        $request = $this->getMock('\Zend\StdLib\Parameters');
+        $request = $this->createMock('\Zend\StdLib\Parameters');
 
-        $results = $this->getMock('VuFindSearch\Response\RecordCollectionInterface');
+        $results = $this->createMock('VuFindSearch\Response\RecordCollectionInterface');
         $results->expects($this->once())->method('getRecords')
             ->will($this->returnValue($records));
 
@@ -246,8 +246,8 @@ class RandomRecommendTest extends TestCase
      */
     public function testWillReturnResults()
     {
-        $service = $this->getMock('VuFindSearch\Service');
-        $paramManager = $this->getMock('VuFind\Search\Params\PluginManager');
+        $service = $this->createMock('VuFindSearch\Service');
+        $paramManager = $this->createMock('VuFind\Search\Params\PluginManager');
         $recommend = new Random($service, $paramManager);
         $records = ["1", "2", "3", "4", "5"];
 
@@ -257,9 +257,9 @@ class RandomRecommendTest extends TestCase
         $params = $results->getParams();
         $query = $this->getFixture('query');
         $params->setBasicSearch($query->getString(), $query->getHandler());
-        $request = $this->getMock('\Zend\StdLib\Parameters');
+        $request = $this->createMock('\Zend\StdLib\Parameters');
 
-        $results = $this->getMock('VuFindSearch\Response\RecordCollectionInterface');
+        $results = $this->createMock('VuFindSearch\Response\RecordCollectionInterface');
         $results->expects($this->once())->method('getRecords')
             ->will($this->returnValue($records));
 
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/CacheTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/CacheTest.php
index 4e9e68da80c..0a7ad313dea 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/CacheTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/CacheTest.php
@@ -284,7 +284,7 @@ class CacheTest extends TestCase
      */
     protected function getRecordFactoryManager()
     {
-        $recordFactoryManager = $this->getMock(
+        $recordFactoryManager = $this->createMock(
             'VuFind\RecordDriver\PluginManager'
         );
         $recordFactoryManager->method('getSolrRecord')->will(
@@ -324,7 +324,7 @@ class CacheTest extends TestCase
      */
     protected function getDriver($id = 'test', $source = 'Solr')
     {
-        $driver = $this->getMock('VuFind\RecordDriver\AbstractBase');
+        $driver = $this->createMock('VuFind\RecordDriver\AbstractBase');
         $driver->expects($this->any())
             ->method('getUniqueId')
             ->will($this->returnValue($id));
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php
index 0406874f133..99ce6b1f5dd 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php
@@ -57,7 +57,7 @@ class LoaderTest extends TestCase
     public function testMissingRecord()
     {
         $collection = $this->getCollection([]);
-        $service = $this->getMock('VuFindSearch\Service');
+        $service = $this->createMock('VuFindSearch\Service');
         $service->expects($this->once())->method('retrieve')
             ->with($this->equalTo('Solr'), $this->equalTo('test'))
             ->will($this->returnValue($collection));
@@ -73,12 +73,12 @@ class LoaderTest extends TestCase
     public function testToleratedMissingRecord()
     {
         $collection = $this->getCollection([]);
-        $service = $this->getMock('VuFindSearch\Service');
+        $service = $this->createMock('VuFindSearch\Service');
         $service->expects($this->once())->method('retrieve')
             ->with($this->equalTo('Solr'), $this->equalTo('test'))
             ->will($this->returnValue($collection));
         $missing = $this->getDriver('missing', 'Missing');
-        $factory = $this->getMock('VuFind\RecordDriver\PluginManager');
+        $factory = $this->createMock('VuFind\RecordDriver\PluginManager');
         $factory->expects($this->once())->method('get')
             ->with($this->equalTo('Missing'))
             ->will($this->returnValue($missing));
@@ -96,7 +96,7 @@ class LoaderTest extends TestCase
     {
         $driver = $this->getDriver();
         $collection = $this->getCollection([$driver]);
-        $service = $this->getMock('VuFindSearch\Service');
+        $service = $this->createMock('VuFindSearch\Service');
         $service->expects($this->once())->method('retrieve')
             ->with($this->equalTo('Solr'), $this->equalTo('test'))
             ->will($this->returnValue($collection));
@@ -120,12 +120,12 @@ class LoaderTest extends TestCase
         $collection2 = $this->getCollection([$driver3]);
         $collection3 = $this->getCollection([]);
 
-        $factory = $this->getMock('VuFind\RecordDriver\PluginManager');
+        $factory = $this->createMock('VuFind\RecordDriver\PluginManager');
         $factory->expects($this->once())->method('get')
             ->with($this->equalTo('Missing'))
             ->will($this->returnValue($missing));
 
-        $service = $this->getMock('VuFindSearch\Service');
+        $service = $this->createMock('VuFindSearch\Service');
         $service->expects($this->at(0))->method('retrieveBatch')
             ->with($this->equalTo('Solr'), $this->equalTo(['test1', 'test2']))
             ->will($this->returnValue($collection1));
@@ -154,7 +154,7 @@ class LoaderTest extends TestCase
      */
     protected function getDriver($id = 'test', $source = 'Solr')
     {
-        $driver = $this->getMock('VuFind\RecordDriver\AbstractBase');
+        $driver = $this->createMock('VuFind\RecordDriver\AbstractBase');
         $driver->expects($this->any())->method('getUniqueId')
             ->will($this->returnValue($id));
         $driver->expects($this->any())->method('getSourceIdentifier')
@@ -173,7 +173,7 @@ class LoaderTest extends TestCase
     protected function getLoader(SearchService $service, RecordFactory $factory = null)
     {
         if (null === $factory) {
-            $factory = $this->getMock('VuFind\RecordDriver\PluginManager');
+            $factory = $this->createMock('VuFind\RecordDriver\PluginManager');
         }
         return new Loader($service, $factory);
     }
@@ -187,7 +187,7 @@ class LoaderTest extends TestCase
      */
     protected function getCollection($records)
     {
-        $collection = $this->getMock('VuFindSearch\Response\RecordCollectionInterface');
+        $collection = $this->createMock('VuFindSearch\Response\RecordCollectionInterface');
         $collection->expects($this->any())->method('getRecords')->will($this->returnValue($records));
         $collection->expects($this->any())->method('count')->will($this->returnValue(count($records)));
         return $collection;
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/RouterTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/RouterTest.php
index fa405428915..1a4be2c7d2b 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/RouterTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/RouterTest.php
@@ -174,7 +174,7 @@ class RouterTest extends TestCase
      */
     protected function getDriver($id = 'test', $source = 'Solr')
     {
-        $driver = $this->getMock('VuFind\RecordDriver\AbstractBase');
+        $driver = $this->createMock('VuFind\RecordDriver\AbstractBase');
         $driver->expects($this->any())->method('getUniqueId')
             ->will($this->returnValue($id));
         $driver->expects($this->any())->method('getSourceIdentifier')
@@ -195,13 +195,13 @@ class RouterTest extends TestCase
         if (null === $record) {
             $record = $this->getDriver();
         }
-        $loader = $this->getMock(
-            'VuFind\Record\Loader', [],
-            [
-                $this->getMock('VuFindSearch\Service'),
-                $this->getMock('VuFind\RecordDriver\PluginManager')
-            ]
-        );
+        $loader = $this->getMockBuilder('VuFind\Record\Loader')
+            ->setConstructorArgs(
+                [
+                    $this->createMock('VuFindSearch\Service'),
+                    $this->createMock('VuFind\RecordDriver\PluginManager')
+                ]
+            )->getMock();
         $loader->expects($this->any())->method('load')
             ->will($this->returnValue($record));
 
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/SimilarTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/SimilarTest.php
index 5b627aef27a..34f5c0af8ec 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/SimilarTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/SimilarTest.php
@@ -48,11 +48,15 @@ class SimilarTest extends \VuFindTest\Unit\TestCase
     {
         // Similar is really just a thin wrapper around the search service; make
         // sure it does its job properly with the help of some mocks.
-        $driver = $this->getMock('VuFind\RecordDriver\SolrDefault', ['getUniqueId']);
+        $driver = $this->getMockBuilder('VuFind\RecordDriver\SolrDefault')
+            ->setMethods(['getUniqueId'])
+            ->getMock();
         $driver->expects($this->once())
             ->method('getUniqueId')
             ->will($this->returnValue('fakeid'));
-        $service = $this->getMock('VuFindSearch\Service', ['similar']);
+        $service = $this->getMockBuilder('VuFindSearch\Service')
+            ->setMethods(['similar'])
+            ->getMock();
         $service->expects($this->once())
             ->method('similar')
             ->with($this->equalTo('Solr'), $this->equalTo('fakeid'))
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/WorldCatSimilarTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/WorldCatSimilarTest.php
index 19b67cf1b98..d1bc18b54a8 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/WorldCatSimilarTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/WorldCatSimilarTest.php
@@ -46,10 +46,9 @@ class WorldCatSimilarTest extends \VuFindTest\Unit\TestCase
      */
     public function testGetResults()
     {
-        $driver = $this->getMock(
-            'VuFind\RecordDriver\WorldCat',
-            ['tryMethod', 'getPrimaryAuthor', 'getAllSubjectHeadings', 'getTitle', 'getUniqueId', 'getSourceIdentifier']
-        );
+        $driver = $this->getMockBuilder('VuFind\RecordDriver\WorldCat')
+            ->setMethods(['tryMethod', 'getPrimaryAuthor', 'getAllSubjectHeadings', 'getTitle', 'getUniqueId', 'getSourceIdentifier'])
+            ->getMock();
         $driver->expects($this->once())
             ->method('tryMethod')
             ->with($this->equalTo('getDeweyCallNumber'))
@@ -69,9 +68,13 @@ class WorldCatSimilarTest extends \VuFindTest\Unit\TestCase
         $driver->expects($this->once())
             ->method('getSourceIdentifier')
             ->will($this->returnValue('WorldCat'));
-        $service = $this->getMock('VuFindSearch\Service', ['search']);
+        $service = $this->getMockBuilder('VuFindSearch\Service')
+            ->setMethods(['search'])->getMock();
         $expectedQuery = new Query('(srw.dd any "fakedc" or srw.au all "fakepa" or srw.su all "fakesh1a fakesh1b" or srw.su all "fakesh2" or srw.ti any "faketitle") not srw.no all "fakeid"');
-        $response = $this->getMock('VuFindSearch\Backend\WorldCat\Response\XML\RecordCollection', ['getRecords'], [['offset' => 0, 'total' => 0]]);
+        $response = $this->getMockBuilder('VuFindSearch\Backend\WorldCat\Response\XML\RecordCollection')
+            ->setMethods(['getRecords'])
+            ->setConstructorArgs([['offset' => 0, 'total' => 0]])
+            ->getMock();
         $response->expects($this->once())
             ->method('getRecords')
             ->will($this->returnValue(['fakeresponse']));
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/DynamicRoleProviderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/DynamicRoleProviderTest.php
index 76455cf40f7..7cb020fc6a2 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/DynamicRoleProviderTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/DynamicRoleProviderTest.php
@@ -101,7 +101,7 @@ class DynamicRoleProviderTest extends \VuFindTest\Unit\TestCase
     {
         $pm = new PluginManager();
         foreach (['a', 'b', 'c'] as $name) {
-            $pm->setService($name, $this->getMock('VuFind\Role\PermissionProvider\PermissionProviderInterface'));
+            $pm->setService($name, $this->createMock('VuFind\Role\PermissionProvider\PermissionProviderInterface'));
         }
         return $pm;
     }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php
index 29bbbf23964..6e907193f2d 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php
@@ -194,6 +194,6 @@ class ClickatellTest extends \VuFindTest\Unit\TestCase
      */
     protected function getMockClient()
     {
-        return $this->getMock('Zend\Http\Client');
+        return $this->createMock('Zend\Http\Client');
     }
 }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/OnCampusListenerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/OnCampusListenerTest.php
index 2f9971b24e8..020d4d4301c 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/OnCampusListenerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/OnCampusListenerTest.php
@@ -73,7 +73,7 @@ class OnCampusListenerTest extends TestCase
     public function testAttach()
     {
         $listener = new InjectOnCampusListener();
-        $mock = $this->getMock('Zend\EventManager\SharedEventManagerInterface');
+        $mock = $this->createMock('Zend\EventManager\SharedEventManagerInterface');
         $mock->expects($this->once())->method('attach')->with(
             $this->equalTo('VuFind\Search'),
             $this->equalTo('pre'),
@@ -93,7 +93,7 @@ class OnCampusListenerTest extends TestCase
             ->disableOriginalConstructor()
             ->getMock();
         $listener = new InjectOnCampusListener($mockPermController);
-        $mock = $this->getMock('Zend\EventManager\SharedEventManagerInterface');
+        $mock = $this->createMock('Zend\EventManager\SharedEventManagerInterface');
         $mock->expects($this->once())->method('attach')->with(
             $this->equalTo('VuFind\Search'),
             $this->equalTo('pre'),
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php
index 4059477ccec..fffe9d1aa6c 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php
@@ -208,13 +208,13 @@ class SearchTabsHelperTest extends TestCase
     protected function getSearchTabsHelper($config = 'default_unfiltered',
         $filters = null
     ) {
-        $mockRequest = $this->getMock('Zend\Http\Request');
+        $mockRequest = $this->createMock('Zend\Http\Request');
         $mockRequest->expects($this->any())
             ->method('getQuery')
             ->with($this->equalTo('hiddenFilters'))
             ->willReturn($filters);
 
-        $configManager = $this->getMock('VuFind\Config\PluginManager');
+        $configManager = $this->createMock('VuFind\Config\PluginManager');
 
         $mockSolrOptions = $this->getMockBuilder('VuFind\Search\Solr\Options')
             ->disableOriginalConstructor()->getMock();
@@ -236,7 +236,7 @@ class SearchTabsHelperTest extends TestCase
                 new \VuFind\Search\Primo\Params($mockPrimoOptions, $configManager)
             );
 
-        $mockResults = $this->getMock('VuFind\Search\Results\PluginManager');
+        $mockResults = $this->createMock('VuFind\Search\Results\PluginManager');
         $mockResults->expects($this->any())
             ->method('get')
             ->will(
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ConditionalFilterListenerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ConditionalFilterListenerTest.php
index e6ddeacf7d3..321294694bb 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ConditionalFilterListenerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ConditionalFilterListenerTest.php
@@ -95,7 +95,7 @@ class ConditionalFilterListenerTest extends TestCase
     public function testAttach()
     {
         $listener = new InjectConditionalFilterListener(self::$emptySearchConfig);
-        $mock = $this->getMock('Zend\EventManager\SharedEventManagerInterface');
+        $mock = $this->createMock('Zend\EventManager\SharedEventManagerInterface');
         $mock->expects($this->once())->method('attach')->with(
             $this->equalTo('VuFind\Search'),
             $this->equalTo('pre'),
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/FilterFieldConversionListenerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/FilterFieldConversionListenerTest.php
index 06653b65526..52a6580cc6d 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/FilterFieldConversionListenerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/FilterFieldConversionListenerTest.php
@@ -53,7 +53,7 @@ class FilterFieldConversionListenerTest extends TestCase
     public function testAttach()
     {
         $listener = new FilterFieldConversionListener(['foo' => 'bar']);
-        $mock = $this->getMock('Zend\EventManager\SharedEventManagerInterface');
+        $mock = $this->createMock('Zend\EventManager\SharedEventManagerInterface');
         $mock->expects($this->once())->method('attach')->with(
             $this->equalTo('VuFind\Search'),
             $this->equalTo('pre'),
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HideFacetValueListenerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HideFacetValueListenerTest.php
index c9cca9fa829..d72b6add077 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HideFacetValueListenerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HideFacetValueListenerTest.php
@@ -120,7 +120,7 @@ class HideFacetValueListenerTest extends TestCase
     public function testAttach()
     {
         $listener = $this->getListener();
-        $mock = $this->getMock('Zend\EventManager\SharedEventManagerInterface');
+        $mock = $this->createMock('Zend\EventManager\SharedEventManagerInterface');
         $mock->expects($this->once())->method('attach')->with(
             $this->equalTo('VuFind\Search'),
             $this->equalTo('post'),
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/MultiIndexListenerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/MultiIndexListenerTest.php
index 86f245d8699..be777ed198c 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/MultiIndexListenerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/MultiIndexListenerTest.php
@@ -182,7 +182,7 @@ class MultiIndexListenerTest extends TestCase
      */
     public function testAttach()
     {
-        $mock = $this->getMock('Zend\EventManager\SharedEventManagerInterface');
+        $mock = $this->createMock('Zend\EventManager\SharedEventManagerInterface');
         $mock->expects($this->once())->method('attach')->with(
             $this->equalTo('VuFind\Search'),
             $this->equalTo('pre'),
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php
index 3543fedbf19..006ab35c103 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php
@@ -144,7 +144,7 @@ class UrlQueryHelperTest extends TestCase
     public function testFactory()
     {
         $factory = new UrlQueryHelperFactory();
-        $config = $this->getMock('VuFind\Config\PluginManager');
+        $config = $this->createMock('VuFind\Config\PluginManager');
         $params = new \VuFindTest\Search\TestHarness\Params(
             new \VuFindTest\Search\TestHarness\Options($config), $config
         );
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordDataFormatterTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordDataFormatterTest.php
index 901e0d711fd..fe2e7491562 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordDataFormatterTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordDataFormatterTest.php
@@ -136,7 +136,7 @@ class RecordDataFormatterTest extends \VuFindTest\Unit\ViewHelperTestCase
         $match = new \Zend\Mvc\Router\RouteMatch([]);
         $match->setMatchedRouteName('foo');
         $view->plugin('url')
-            ->setRouter($this->getMock('Zend\Mvc\Router\RouteStackInterface'))
+            ->setRouter($this->createMock('Zend\Mvc\Router\RouteStackInterface'))
             ->setRouteMatch($match);
 
         // Inject the view object into all of the helpers:
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php
index 33121548b7d..ae657c33920 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php
@@ -160,7 +160,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetListEntry()
     {
-        $driver = $this->getMock('VuFind\RecordDriver\AbstractBase');
+        $driver = $this->createMock('VuFind\RecordDriver\AbstractBase');
         $driver->expects($this->once())->method('getContainingLists')
             ->with($this->equalTo(42))
             ->will($this->returnValue([1, 2, 3]));
@@ -490,7 +490,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase
         if (null === $context) {
             $context = $this->getMockContext();
         }
-        $view = $this->getMock('Zend\View\Renderer\PhpRenderer');
+        $view = $this->createMock('Zend\View\Renderer\PhpRenderer');
         if ($url) {
             $url = $this->getMockUrl($url);
         }
@@ -530,7 +530,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase
      */
     protected function getMockResolver()
     {
-        return $this->getMock('Zend\View\Resolver\ResolverInterface');
+        return $this->createMock('Zend\View\Resolver\ResolverInterface');
     }
 
     /**
@@ -540,7 +540,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase
      */
     protected function getMockContext()
     {
-        $context = $this->getMock('VuFind\View\Helper\Root\Context');
+        $context = $this->createMock('VuFind\View\Helper\Root\Context');
         $context->expects($this->any())->method('__invoke')
             ->will($this->returnValue($context));
         return $context;
@@ -555,7 +555,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase
      */
     protected function getMockUrl($expectedRoute)
     {
-        $url = $this->getMock('Zend\View\Helper\Url');
+        $url = $this->createMock('Zend\View\Helper\Url');
         $url->expects($this->once())->method('__invoke')
             ->with($this->equalTo($expectedRoute))
             ->will($this->returnValue('http://foo/bar'));
@@ -571,7 +571,7 @@ class RecordTest extends \PHPUnit_Framework_TestCase
      */
     protected function getMockServerUrl()
     {
-        $url = $this->getMock('Zend\View\Helper\ServerUrl');
+        $url = $this->createMock('Zend\View\Helper\ServerUrl');
         $url->expects($this->once())->method('__invoke')
             ->will($this->returnValue('http://server-foo/baz'));
         return $url;
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/SafeMoneyFormatTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/SafeMoneyFormatTest.php
index afda8fa117b..0eb8852ef2f 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/SafeMoneyFormatTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/SafeMoneyFormatTest.php
@@ -80,7 +80,7 @@ class SafeMoneyFormatTest extends \PHPUnit_Framework_TestCase
     public function testFormatting()
     {
         $escaper = new \Zend\View\Helper\EscapeHtml();
-        $view = $this->getMock('Zend\View\Renderer\PhpRenderer');
+        $view = $this->createMock('Zend\View\Renderer\PhpRenderer');
         $view->expects($this->any())->method('plugin')
             ->with($this->equalTo('escapeHtml'))
             ->will($this->returnValue($escaper));
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php
index 466e5067de2..63f4d8d279a 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/TranslateTest.php
@@ -219,7 +219,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
     public function testLocaleWithTranslator()
     {
         $translate = new Translate();
-        $translator = $this->getMock('Zend\I18n\Translator\Translator');
+        $translator = $this->createMock('Zend\I18n\Translator\Translator');
         $translator->expects($this->once())->method('getLocale')
             ->will($this->returnValue('foo'));
         $translate->setTranslator($translator);
@@ -234,7 +234,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
     public function testGetTranslator()
     {
         $translate = new Translate();
-        $translator = $this->getMock('Zend\I18n\Translator\TranslatorInterface');
+        $translator = $this->createMock('Zend\I18n\Translator\TranslatorInterface');
         $translate->setTranslator($translator);
         $this->assertEquals($translator, $translate->getTranslator());
     }
@@ -252,7 +252,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
             return isset($translations[$domain][$str])
                 ? $translations[$domain][$str] : $str;
         };
-        $translator = $this->getMock('Zend\I18n\Translator\TranslatorInterface');
+        $translator = $this->createMock('Zend\I18n\Translator\TranslatorInterface');
         $translator->expects($this->any())->method('translate')
             ->will($this->returnCallback($callback));
         return $translator;
diff --git a/module/VuFindApi/tests/unit-tests/src/VuFindTest/Formatter/FacetFormatterTest.php b/module/VuFindApi/tests/unit-tests/src/VuFindTest/Formatter/FacetFormatterTest.php
index 7fe9d41fc62..3dc10384df6 100644
--- a/module/VuFindApi/tests/unit-tests/src/VuFindTest/Formatter/FacetFormatterTest.php
+++ b/module/VuFindApi/tests/unit-tests/src/VuFindTest/Formatter/FacetFormatterTest.php
@@ -156,7 +156,7 @@ class FacetFormatterTest extends \VuFindTest\Unit\TestCase
 
         $results = [];
         $helper = new \VuFind\Search\Solr\HierarchicalFacetHelper();
-        $configManager = $this->getMock('VuFind\Config\PluginManager');
+        $configManager = $this->createMock('VuFind\Config\PluginManager');
         $params = new Params(new Options($configManager), $configManager);
         $requestParams = new \Zend\StdLib\Parameters($request);
         $params->initFromRequest($requestParams);
@@ -181,7 +181,7 @@ class FacetFormatterTest extends \VuFindTest\Unit\TestCase
      */
     protected function getFakeResults($request, $facetData)
     {
-        $configManager = $this->getMock('VuFind\Config\PluginManager');
+        $configManager = $this->createMock('VuFind\Config\PluginManager');
         $params = new Params(new Options($configManager), $configManager);
         $params->initFromRequest(new \Zend\Stdlib\Parameters($request));
         $ss = $this->getMockBuilder('VuFindSearch\Service')
diff --git a/module/VuFindDevTools/tests/unit-tests/src/VuFindTest/LanguageHelperTest.php b/module/VuFindDevTools/tests/unit-tests/src/VuFindTest/LanguageHelperTest.php
index f64aa53e340..f0acfed7655 100644
--- a/module/VuFindDevTools/tests/unit-tests/src/VuFindTest/LanguageHelperTest.php
+++ b/module/VuFindDevTools/tests/unit-tests/src/VuFindTest/LanguageHelperTest.php
@@ -90,7 +90,7 @@ class LanguageHelperTest extends \VuFindTest\Unit\TestCase
     {
         $config = new Config(['Languages' => ['en' => 'English']]);
         return new LanguageHelper(
-            $this->getMock('VuFind\I18n\Translator\Loader\ExtendedIni'),
+            $this->createMock('VuFind\I18n\Translator\Loader\ExtendedIni'),
             $config
         );
     }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
index b5e01ac1e35..83f7c2f5161 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
@@ -144,7 +144,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     public function testConstructorSetters()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock();
         $config = [
             'EBSCO_Account' => [
@@ -191,10 +191,11 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        $client = $this->getMock('Zend\Http\Client');
-        return $this->getMock(
-            'VuFindSearch\Backend\EDS\Zend2', $mock, [[], $client]
-        );
+        $client = $this->createMock('Zend\Http\Client');
+        return $this->getMockBuilder('VuFindSearch\Backend\EDS\Zend2')
+            ->setMethods($mock)
+            ->setConstructorArgs([[], $client])
+            ->getMock();
     }
 
     /**
@@ -210,10 +211,10 @@ class BackendTest extends \VuFindTest\Unit\TestCase
     protected function getBackend($connector, $factory = null, $cache = null, $container = null, $settings = [], $mock = null)
     {
         if (null === $factory) {
-            $factory = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+            $factory = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         }
         if (null === $cache) {
-            $cache = $this->getMock('Zend\Cache\Storage\Adapter\Filesystem');
+            $cache = $this->createMock('Zend\Cache\Storage\Adapter\Filesystem');
         }
         if (null === $container) {
             $container = $this->getMockBuilder('Zend\Session\Container')
@@ -223,7 +224,10 @@ class BackendTest extends \VuFindTest\Unit\TestCase
             return new Backend($connector, $factory, $cache, $container, new \Zend\Config\Config($settings));
         } else {
             $params = [$connector, $factory, $cache, $container, new \Zend\Config\Config($settings)];
-            return $this->getMock('VuFindSearch\Backend\EDS\Backend', $mock, $params);
+            return $this->getMockBuilder(__NAMESPACE__ . '\BackendMock')
+                ->setMethods($mock)
+                ->setConstructorArgs($params)
+                ->getMock();
         }
     }
 
@@ -243,3 +247,10 @@ class BackendTest extends \VuFindTest\Unit\TestCase
     }
 
 }
+
+class BackendMock extends \VuFindSearch\Backend\EDS\Backend
+{
+    public function getAuthenticationToken($isInvalid = false)
+    {
+    }
+}
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/BackendTest.php
index 504a1b632b8..8445ea96657 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/BackendTest.php
@@ -128,7 +128,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     public function testConstructorSetters()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock();
         $back = new Backend($conn, $fact);
         $this->assertEquals($fact, $back->getRecordCollectionFactory());
@@ -164,11 +164,11 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        $client = $this->getMock('Zend\Http\Client');
-        return $this->getMock(
-            'VuFindSearch\Backend\EIT\Connector', $mock,
-            ['http://fake', $client, 'profile', 'pwd', 'dbs']
-        );
+        $client = $this->createMock('Zend\Http\Client');
+        return $this->getMockBuilder(__NAMESPACE__ . '\ConnectorMock')
+            ->setMethods($mock)
+            ->setConstructorArgs(['http://fake', $client, 'profile', 'pwd', 'dbs'])
+            ->getMock();
     }
 
     /**
@@ -186,3 +186,10 @@ class BackendTest extends \VuFindTest\Unit\TestCase
         return new \VuFindSearch\Backend\EIT\Response\XML\RecordCollectionFactory($callback);
     }
 }
+
+class ConnectorMock extends \VuFindSearch\Backend\EIT\Connector
+{
+    public function call($method = 'GET', $params = null)
+    {
+    }
+}
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php
index 1a92ff7ee17..0f9484ef118 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/LibGuides/BackendTest.php
@@ -121,7 +121,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     public function testConstructorSetters()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnector();
         $back = new Backend($conn, $fact);
         $this->assertEquals($fact, $back->getRecordCollectionFactory());
@@ -243,11 +243,11 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        $client = $this->getMock('Zend\Http\Client');
-        return $this->getMock(
-            'VuFindSearch\Backend\LibGuides\Connector', $mock,
-            ['fakeid', $client]
-        );
+        $client = $this->createMock('Zend\Http\Client');
+        return $this->getMockBuilder('VuFindSearch\Backend\LibGuides\Connector')
+            ->setMethods($mock)
+            ->setConstructorArgs(['fakeid', $client])
+            ->getMock();
     }
 
     /**
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Pazpar2/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Pazpar2/BackendTest.php
index 7f5d0fc2340..21ac2db7599 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Pazpar2/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Pazpar2/BackendTest.php
@@ -51,13 +51,12 @@ class BackendTest extends TestCase
      */
     public function testGetConnector()
     {
-        $connector = $this->getMock(
-            'VuFindSearch\Backend\Pazpar2\Connector', [],
-            ['http://fake', $this->getMock('Zend\Http\Client')]
-        );
+        $connector = $this->getMockBuilder('VuFindSearch\Backend\Pazpar2\Connector')
+            ->setConstructorArgs(['http://fake', $this->createMock('Zend\Http\Client')])
+            ->getMock();
         $back = new Backend(
             $connector,
-            $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface')
+            $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface')
         );
         $this->assertEquals($connector, $back->getConnector());
     }
@@ -150,10 +149,11 @@ class BackendTest extends TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        $client = $this->getMock('Zend\Http\Client');
-        return $this->getMock(
-            'VuFindSearch\Backend\Pazpar2\Connector', $mock, ['fake', $client]
-        );
+        $client = $this->createMock('Zend\Http\Client');
+        return $this->getMockBuilder('VuFindSearch\Backend\Pazpar2\Connector')
+            ->setMethods($mock)
+            ->setConstructorArgs(['fake', $client])
+            ->getMock();
     }
 
     /**
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php
index 0de237bb03f..48c1aaf06ce 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Primo/BackendTest.php
@@ -121,7 +121,7 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     public function testConstructorSetters()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock();
         $back = new Backend($conn, $fact);
         $this->assertEquals($fact, $back->getRecordCollectionFactory());
@@ -209,10 +209,10 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        $client = $this->getMock('Zend\Http\Client');
-        return $this->getMock(
-            'VuFindSearch\Backend\Primo\Connector', $mock,
-            ['http://fakeaddress.none', 'inst-id', $client]
-        );
+        $client = $this->createMock('Zend\Http\Client');
+        return $this->getMockBuilder('VuFindSearch\Backend\Primo\Connector')
+            ->setMethods($mock)
+            ->setConstructorArgs(['http://fakeaddress.none', 'inst-id', $client])
+            ->getMock();
     }
 }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php
index f65232567d0..3aaf2144ae9 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php
@@ -286,16 +286,17 @@ class BackendTest extends PHPUnit_Framework_TestCase
     public function testRandom()
     {
         // Test that random sort parameter is added:
-        $params = $this->getMock('VuFindSearch\ParamBag', ['set']);
+        $params = $this->getMockBuilder('VuFindSearch\ParamBag')
+            ->setMethods(['set'])->getMock();
         $params->expects($this->once())->method('set')
             ->with($this->equalTo('sort'), $this->matchesRegularExpression('/[0-9]+_random asc/'));
 
         // Test that random proxies search; stub out injectResponseWriter() to prevent it
         // from injecting unwanted extra parameters into $params:
-        $back = $this->getMock(
-            'VuFindSearch\Backend\Solr\Backend', ['search', 'injectResponseWriter'],
-            [$this->getConnectorMock()]
-        );
+        $back = $this->getMockBuilder(__NAMESPACE__ . '\BackendMock')
+            ->setMethods(['search', 'injectResponseWriter'])
+            ->setConstructorArgs([$this->getConnectorMock()])
+            ->getMock();
         $back->expects($this->once())->method('injectResponseWriter');
         $back->expects($this->once())->method('search')
             ->will($this->returnValue('dummy'));
@@ -350,6 +351,16 @@ class BackendTest extends PHPUnit_Framework_TestCase
     protected function getConnectorMock(array $mock = [])
     {
         $map = new HandlerMap(['select' => ['fallback' => true]]);
-        return $this->getMock('VuFindSearch\Backend\Solr\Connector', $mock, ['http://example.org/', $map]);
+        return $this->getMockBuilder('VuFindSearch\Backend\Solr\Connector')
+            ->setMethods($mock)
+            ->setConstructorArgs(['http://example.org/', $map])
+            ->getMock();
+    }
+}
+
+class BackendMock extends \VuFindSearch\Backend\Solr\Backend
+{
+    public function injectResponseWriter(\VuFindSearch\ParamBag $params)
+    {
     }
 }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php
index 7f8b7f51627..173736cd15e 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php
@@ -134,7 +134,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase
     public function testSaveThrowsUnknownFormat()
     {
         $conn = $this->createConnector();
-        $document = $this->getMock('VuFindSearch\Backend\Solr\Document\UpdateDocument');
+        $document = $this->createMock('VuFindSearch\Backend\Solr\Document\UpdateDocument');
         $conn->write($document, 'unknown', 'update');
     }
 
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionTest.php
index e33db1d255c..51eaf142b6b 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionTest.php
@@ -78,7 +78,7 @@ class RecordCollectionTest extends PHPUnit_Framework_TestCase
             ]
         );
         for ($i = 0; $i < 5; $i++) {
-            $coll->add($this->getMock('VuFindSearch\Response\RecordInterface'));
+            $coll->add($this->createMock('VuFindSearch\Response\RecordInterface'));
         }
         $coll->rewind();
         $this->assertEquals(5, $coll->key());
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php
index cdd350d7382..691079adf27 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/BackendTest.php
@@ -125,7 +125,7 @@ class BackendTest extends TestCase
      */
     public function testRetrieveWrapsSummonException()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock(['getRecord']);
         $conn->expects($this->once())
             ->method('getRecord')
@@ -177,7 +177,7 @@ class BackendTest extends TestCase
      */
     public function testSearchWrapsSummonException()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock(['query']);
         $conn->expects($this->once())
             ->method('query')
@@ -211,7 +211,7 @@ class BackendTest extends TestCase
      */
     public function testConstructorSetters()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock();
         $back = new Backend($conn, $fact);
         $this->assertEquals($fact, $back->getRecordCollectionFactory());
@@ -260,8 +260,9 @@ class BackendTest extends TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        return $this->getMock(
-            'SerialsSolutions\Summon\Zend2', $mock, ['id', 'key']
-        );
+        return $this->getMockBuilder('SerialsSolutions\Summon\Zend2')
+            ->setMethods($mock)
+            ->setConstructorArgs(['id', 'key'])
+            ->getMock();
     }
 }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/BackendTest.php
index 2b9e8b29f04..d17a2b55c00 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/BackendTest.php
@@ -113,7 +113,7 @@ class BackendTest extends PHPUnit_Framework_TestCase
      */
     public function testConstructorSetters()
     {
-        $fact = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
+        $fact = $this->createMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         $conn = $this->getConnectorMock();
         $back = new Backend($conn, $fact);
         $this->assertEquals($fact, $back->getRecordCollectionFactory());
@@ -149,10 +149,10 @@ class BackendTest extends PHPUnit_Framework_TestCase
      */
     protected function getConnectorMock(array $mock = [])
     {
-        $client = $this->getMock('Zend\Http\Client');
-        return $this->getMock(
-            'VuFindSearch\Backend\WorldCat\Connector',
-            $mock, ['fake', $client]
-        );
+        $client = $this->createMock('Zend\Http\Client');
+        return $this->getMockBuilder('VuFindSearch\Backend\WorldCat\Connector')
+            ->setMethods($mock)
+            ->setConstructorArgs(['fake', $client])
+            ->getMock();
     }
 }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php
index 6c1870124d7..cea0d5d3ea3 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/WorldCat/ConnectorTest.php
@@ -49,7 +49,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetHoldings()
     {
-        $client = $this->getMock('Zend\Http\Client');
+        $client = $this->createMock('Zend\Http\Client');
         $connector = new Connector('key', $client);
         $client->expects($this->once())->method('setMethod')
             ->with($this->equalTo('POST'))
@@ -57,7 +57,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
         $client->expects($this->once())->method('setUri')
             ->with($this->equalTo('http://www.worldcat.org/webservices/catalog/content/libraries/baz?wskey=key&servicelevel=full'));
         $body = '<foo>bar</foo>';
-        $response = $this->getMock('Zend\Http\Response');
+        $response = $this->createMock('Zend\Http\Response');
         $response->expects($this->once())->method('getBody')
             ->will($this->returnValue($body));
         $response->expects($this->any())->method('isSuccess')
@@ -77,12 +77,12 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetHoldingsHttpFailure()
     {
-        $client = $this->getMock('Zend\Http\Client');
+        $client = $this->createMock('Zend\Http\Client');
         $connector = new Connector('key', $client);
         $client->expects($this->once())->method('setMethod')
             ->with($this->equalTo('POST'))
             ->will($this->returnValue($client));
-        $response = $this->getMock('Zend\Http\Response');
+        $response = $this->createMock('Zend\Http\Response');
         $response->expects($this->any())->method('isSuccess')
             ->will($this->returnValue(false));
         $client->expects($this->once())->method('send')
@@ -97,7 +97,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetRecord()
     {
-        $client = $this->getMock('Zend\Http\Client');
+        $client = $this->createMock('Zend\Http\Client');
         $connector = new Connector('key', $client);
         $client->expects($this->once())->method('setMethod')
             ->with($this->equalTo('POST'))
@@ -105,7 +105,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
         $client->expects($this->once())->method('setUri')
             ->with($this->equalTo('http://www.worldcat.org/webservices/catalog/content/baz?servicelevel=full&wskey=key'));
         $body = '<foo>bar</foo>';
-        $response = $this->getMock('Zend\Http\Response');
+        $response = $this->createMock('Zend\Http\Response');
         $response->expects($this->once())->method('getBody')
             ->will($this->returnValue($body));
         $response->expects($this->any())->method('isSuccess')
@@ -123,7 +123,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetRecordWithError()
     {
-        $client = $this->getMock('Zend\Http\Client');
+        $client = $this->createMock('Zend\Http\Client');
         $connector = new Connector('key', $client);
         $client->expects($this->once())->method('setMethod')
             ->with($this->equalTo('POST'))
@@ -131,7 +131,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
         $client->expects($this->once())->method('setUri')
             ->with($this->equalTo('http://www.worldcat.org/webservices/catalog/content/baz?servicelevel=full&wskey=key'));
         $body = '<foo><diagnostic>bad</diagnostic></foo>';
-        $response = $this->getMock('Zend\Http\Response');
+        $response = $this->createMock('Zend\Http\Response');
         $response->expects($this->once())->method('getBody')
             ->will($this->returnValue($body));
         $response->expects($this->any())->method('isSuccess')
@@ -149,7 +149,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
      */
     public function testSearch()
     {
-        $client = $this->getMock('Zend\Http\Client');
+        $client = $this->createMock('Zend\Http\Client');
         $connector = new Connector('key', $client);
         $client->expects($this->once())->method('setMethod')
             ->with($this->equalTo('POST'))
@@ -157,7 +157,7 @@ class ConnectorTest extends \PHPUnit_Framework_TestCase
         $client->expects($this->once())->method('setUri')
             ->with($this->equalTo('http://www.worldcat.org/webservices/catalog/search/sru?version=1.1&x=y&startRecord=0&maximumRecords=20&servicelevel=full&wskey=key'));
         $body = '<foo>,<numberOfRecords>1</numberOfRecords><records><record><recordData>bar</recordData></record></records></foo>';
-        $response = $this->getMock('Zend\Http\Response');
+        $response = $this->createMock('Zend\Http\Response');
         $response->expects($this->once())->method('getBody')
             ->will($this->returnValue($body));
         $response->expects($this->any())->method('isSuccess')
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php
index c55501c9f42..c3b8d710aa1 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/SearchServiceTest.php
@@ -136,7 +136,7 @@ class SearchServiceTest extends TestCase
     public function testRetrieveBatchInterface()
     {
         // Use a special backend for this test...
-        $this->backend = $this->getMock('VuFindTest\TestClassForRetrieveBatchInterface');
+        $this->backend = $this->createMock('VuFindTest\TestClassForRetrieveBatchInterface');
 
         $service = $this->getService();
         $backend = $this->getBackend();
@@ -165,7 +165,7 @@ class SearchServiceTest extends TestCase
     {
         $service = $this->getService();
         $backend = $this->getBackend();
-        $mockRecord = $this->getMock('VuFindSearch\Response\RecordInterface');
+        $mockRecord = $this->createMock('VuFindSearch\Response\RecordInterface');
         $response1 = $this->getRecordCollection();
         $response1->expects($this->once())->method('add')
             ->with($this->equalTo($mockRecord));
@@ -198,7 +198,7 @@ class SearchServiceTest extends TestCase
     public function testRetrieveBatchInterfaceException()
     {
         // Use a special backend for this test...
-        $this->backend = $this->getMock('VuFindTest\TestClassForRetrieveBatchInterface');
+        $this->backend = $this->createMock('VuFindTest\TestClassForRetrieveBatchInterface');
 
         $service = $this->getService();
         $backend = $this->getBackend();
@@ -253,7 +253,7 @@ class SearchServiceTest extends TestCase
     public function testRandomInterface()
     {
         // Use a special backend for this test...
-        $this->backend = $this->getMock('VuFindTest\TestClassForRandomInterface');
+        $this->backend = $this->createMock('VuFindTest\TestClassForRandomInterface');
 
         $service = $this->getService();
         $backend = $this->getBackend();
@@ -291,7 +291,7 @@ class SearchServiceTest extends TestCase
     public function testRandomInterfaceWithException()
     {
         // Use a special backend for this test...
-        $this->backend = $this->getMock('VuFindTest\TestClassForRandomInterface');
+        $this->backend = $this->createMock('VuFindTest\TestClassForRandomInterface');
 
         $service = $this->getService();
         $backend = $this->getBackend();
@@ -348,7 +348,7 @@ class SearchServiceTest extends TestCase
         for ($i = 1; $i < $limit + 1; $i++) {
             $response = $this->getRecordCollection();
             $response->expects($this->any())->method('first')
-                ->will($this->returnValue($this->getMock('VuFindSearch\Response\RecordInterface')));
+                ->will($this->returnValue($this->createMock('VuFindSearch\Response\RecordInterface')));
             $backend->expects($this->at($i))->method('search')
                 ->with(
                     $this->equalTo($query),
@@ -575,7 +575,7 @@ class SearchServiceTest extends TestCase
     public function testSimilar()
     {
         // Use a special backend for this test...
-        $this->backend = $this->getMock('VuFindTest\TestBackendClassForSimilar');
+        $this->backend = $this->createMock('VuFindTest\TestBackendClassForSimilar');
 
         $service = $this->getService();
         $backend = $this->getBackend();
@@ -621,7 +621,7 @@ class SearchServiceTest extends TestCase
     public function testSimilarException()
     {
         // Use a special backend for this test...
-        $this->backend = $this->getMock('VuFindTest\TestBackendClassForSimilar');
+        $this->backend = $this->createMock('VuFindTest\TestBackendClassForSimilar');
 
         $service = $this->getService();
         $backend = $this->getBackend();
@@ -651,9 +651,9 @@ class SearchServiceTest extends TestCase
      */
     public function testFailedResolve()
     {
-        $mockResponse = $this->getMock('Zend\EventManager\ResponseCollection');
+        $mockResponse = $this->createMock('Zend\EventManager\ResponseCollection');
         $mockResponse->expects($this->any())->method('stopped')->will($this->returnValue(false));
-        $em = $this->getMock('Zend\EventManager\EventManagerInterface');
+        $em = $this->createMock('Zend\EventManager\EventManagerInterface');
         $service = new Service();
         $em->expects($this->any())->method('trigger')
             ->with($this->equalTo('resolve'), $this->equalTo($service))
@@ -672,7 +672,7 @@ class SearchServiceTest extends TestCase
     protected function getBackend()
     {
         if (!$this->backend) {
-            $this->backend = $this->getMock('VuFindSearch\Backend\BackendInterface');
+            $this->backend = $this->createMock('VuFindSearch\Backend\BackendInterface');
         }
         return $this->backend;
     }
@@ -684,10 +684,8 @@ class SearchServiceTest extends TestCase
      */
     protected function getService()
     {
-        $em = $this->getMock('Zend\EventManager\EventManagerInterface');
-        $service = $this->getMock('VuFindSearch\Service', ['resolve']);
-        $service->expects($this->any())->method('resolve')
-            ->will($this->returnValue($this->getBackend()));
+        $em = $this->createMock('Zend\EventManager\EventManagerInterface');
+        $service = new SearchServiceMock($this->getBackend());
         $service->setEventManager($em);
         return $service;
     }
@@ -701,7 +699,7 @@ class SearchServiceTest extends TestCase
      */
     protected function getRecordCollection()
     {
-        return $this->getMock('VuFindSearch\Response\AbstractRecordCollection');
+        return $this->createMock('VuFindSearch\Response\AbstractRecordCollection');
     }
 }
 
@@ -728,3 +726,38 @@ abstract class TestClassForRandomInterface
 implements BackendInterface, RandomInterface
 {
 }
+
+/**
+ * Mock class to stub 'resolve'
+ */
+class SearchServiceMock extends \VuFindSearch\Service
+{
+    /**
+     * Service backend
+     *
+     * @var Service
+     */
+    protected $backend;
+
+    /**
+     * Constructor.
+     *
+     * @param Service $backendMock Return value for resolve
+     *
+     * @return void
+     */
+    public function __construct($backendMock)
+    {
+        $this->backend = $backendMock;
+    }
+
+    /**
+     * Generate a fake service.
+     *
+     * @return Service
+     */
+    protected function resolve($backend, $args)
+    {
+        return $this->backend;
+    }
+}
diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeMobileTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeMobileTest.php
index 74ba2f2156d..10b71d33c74 100644
--- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeMobileTest.php
+++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/ThemeMobileTest.php
@@ -64,7 +64,9 @@ class ThemeMobileTest extends Unit\TestCase
      */
     public function testDetection()
     {
-        $detector = $this->getMock('uagent_info', ['DetectMobileLong']);
+        $detector = $this->getMockBuilder('uagent_info')
+            ->setMethods(['DetectMobileLong'])
+            ->getMock();
         $detector->expects($this->once())
             ->method('DetectMobileLong')->will($this->returnValue(true));
         $mobile = new Mobile($detector);
diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/View/Helper/HeadThemeResourcesTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/View/Helper/HeadThemeResourcesTest.php
index 67615920c12..d741648849c 100644
--- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/View/Helper/HeadThemeResourcesTest.php
+++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/View/Helper/HeadThemeResourcesTest.php
@@ -90,7 +90,7 @@ class HeadThemeResourcesTest extends \VuFindTest\Unit\TestCase
      */
     protected function getMockView()
     {
-        $view = $this->getMock('Zend\View\Renderer\PhpRenderer');
+        $view = $this->createMock('Zend\View\Renderer\PhpRenderer');
         $view->expects($this->at(0))->method('plugin')
             ->with($this->equalTo('headmeta'))
             ->will($this->returnValue($this->getMockHeadMeta()));
-- 
GitLab