diff --git a/module/VuFind/tests/bootstrap.php b/module/VuFind/tests/bootstrap.php index 68d51098921ed1941a121828be8e8f42bf50c1e5..22b95084eabbc2d8da362f8a586544260dff7131 100644 --- a/module/VuFind/tests/bootstrap.php +++ b/module/VuFind/tests/bootstrap.php @@ -53,5 +53,7 @@ $loader = Zend\Loader\AutoloaderFactory::getRegisteredAutoloader( ); $loader->registerNamespace('VuFindTest', __DIR__ . '/../src/VuFindTest'); +define('PHPUNIT_SEARCH_FIXTURES', realpath(__DIR__ . '/../../VuFindSearch/tests/unit-tests/fixtures')); + // Use output buffering -- some tests involve HTTP headers and will fail if there is output. ob_start(); \ No newline at end of file diff --git a/module/VuFind/tests/phpunit.xml b/module/VuFind/tests/phpunit.xml index 7a7f81295df16ff004d5e2a7389d9fdd38d5c0ff..b9d59fe1032f133eb751b1001cf326578e7aa146 100644 --- a/module/VuFind/tests/phpunit.xml +++ b/module/VuFind/tests/phpunit.xml @@ -3,6 +3,9 @@ <testsuite name="VuFindHttp"> <directory>../../VuFindHttp/tests/unit-tests/src</directory> </testsuite> + <testsuite name="VuFindSearch"> + <directory>../../VuFindSearch/tests/unit-tests/src</directory> + </testsuite> <testsuite name="VuFindUnit"> <directory>unit-tests/src</directory> </testsuite> @@ -16,6 +19,7 @@ <directory suffix=".php">../src</directory> <directory suffix=".php">../../VuFindConsole/src</directory> <directory suffix=".php">../../VuFindHttp/src</directory> + <directory suffix=".php">../../VuFindSearch/src</directory> <directory suffix=".php">../../VuFindTheme/src</directory> </whitelist> </filter> diff --git a/module/VuFindSearch/tests/unit-tests/bootstrap.php b/module/VuFindSearch/tests/unit-tests/bootstrap.php index 0295fb3a5b090dfd7dd4fed3b8201622b1f502b7..b54270f3bf00a825d08f7d6b4cf604c6a599630b 100644 --- a/module/VuFindSearch/tests/unit-tests/bootstrap.php +++ b/module/VuFindSearch/tests/unit-tests/bootstrap.php @@ -21,4 +21,4 @@ require_once('Zend/Loader/AutoloaderFactory.php'); ) ); -define('PHPUNIT_FIXTURES', realpath(__DIR__ . '/fixtures')); \ No newline at end of file +define('PHPUNIT_SEARCH_FIXTURES', realpath(__DIR__ . '/fixtures')); \ No newline at end of file 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 8588a04191dd22291d8b6c5c0399d10aa941c1d6..e6b1bc504559acb3addf95a810aa38de0be3cc3e 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 @@ -79,7 +79,7 @@ class BackendTest extends PHPUnit_Framework_TestCase */ protected function loadResponse ($fixture) { - $file = realpath(sprintf('%s/solr/response/%s', PHPUNIT_FIXTURES, $fixture)); + $file = realpath(sprintf('%s/solr/response/%s', PHPUNIT_SEARCH_FIXTURES, $fixture)); if (!is_string($file) || !file_exists($file) || !is_readable($file)) { throw new InvalidArgumentException(sprintf('Unable to load fixture file: %s', $file)); } 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 bc7ca4dfba55627f8d48c8027876d0fd6853f416..d7fe42c09ea91002e6133ec7dc82a01e798f781a 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 @@ -128,7 +128,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase */ protected function createConnector ($fixture) { - $file = realpath(sprintf('%s/solr/response/%s', PHPUNIT_FIXTURES, $fixture)); + $file = realpath(sprintf('%s/solr/response/%s', PHPUNIT_SEARCH_FIXTURES, $fixture)); if (!is_string($file) || !file_exists($file) || !is_readable($file)) { throw new InvalidArgumentException(sprintf('Unable to load fixture file: %s', $file)); }