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

Hooked VuFindSearch tests into VuFind test suite.

parent f1631479
No related merge requests found
...@@ -53,5 +53,7 @@ $loader = Zend\Loader\AutoloaderFactory::getRegisteredAutoloader( ...@@ -53,5 +53,7 @@ $loader = Zend\Loader\AutoloaderFactory::getRegisteredAutoloader(
); );
$loader->registerNamespace('VuFindTest', __DIR__ . '/../src/VuFindTest'); $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. // Use output buffering -- some tests involve HTTP headers and will fail if there is output.
ob_start(); ob_start();
\ No newline at end of file
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<testsuite name="VuFindHttp"> <testsuite name="VuFindHttp">
<directory>../../VuFindHttp/tests/unit-tests/src</directory> <directory>../../VuFindHttp/tests/unit-tests/src</directory>
</testsuite> </testsuite>
<testsuite name="VuFindSearch">
<directory>../../VuFindSearch/tests/unit-tests/src</directory>
</testsuite>
<testsuite name="VuFindUnit"> <testsuite name="VuFindUnit">
<directory>unit-tests/src</directory> <directory>unit-tests/src</directory>
</testsuite> </testsuite>
...@@ -16,6 +19,7 @@ ...@@ -16,6 +19,7 @@
<directory suffix=".php">../src</directory> <directory suffix=".php">../src</directory>
<directory suffix=".php">../../VuFindConsole/src</directory> <directory suffix=".php">../../VuFindConsole/src</directory>
<directory suffix=".php">../../VuFindHttp/src</directory> <directory suffix=".php">../../VuFindHttp/src</directory>
<directory suffix=".php">../../VuFindSearch/src</directory>
<directory suffix=".php">../../VuFindTheme/src</directory> <directory suffix=".php">../../VuFindTheme/src</directory>
</whitelist> </whitelist>
</filter> </filter>
......
...@@ -21,4 +21,4 @@ require_once('Zend/Loader/AutoloaderFactory.php'); ...@@ -21,4 +21,4 @@ require_once('Zend/Loader/AutoloaderFactory.php');
) )
); );
define('PHPUNIT_FIXTURES', realpath(__DIR__ . '/fixtures')); define('PHPUNIT_SEARCH_FIXTURES', realpath(__DIR__ . '/fixtures'));
\ No newline at end of file \ No newline at end of file
...@@ -79,7 +79,7 @@ class BackendTest extends PHPUnit_Framework_TestCase ...@@ -79,7 +79,7 @@ class BackendTest extends PHPUnit_Framework_TestCase
*/ */
protected function loadResponse ($fixture) 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)) { if (!is_string($file) || !file_exists($file) || !is_readable($file)) {
throw new InvalidArgumentException(sprintf('Unable to load fixture file: %s', $file)); throw new InvalidArgumentException(sprintf('Unable to load fixture file: %s', $file));
} }
......
...@@ -128,7 +128,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase ...@@ -128,7 +128,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase
*/ */
protected function createConnector ($fixture) 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)) { if (!is_string($file) || !file_exists($file) || !is_readable($file)) {
throw new InvalidArgumentException(sprintf('Unable to load fixture file: %s', $file)); throw new InvalidArgumentException(sprintf('Unable to load fixture file: %s', $file));
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment