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

Filled gaps in coverage.

parent 1e4dbce8
No related merge requests found
......@@ -103,6 +103,17 @@ class NewItemsTest extends TestCase
$this->assertEquals(array('a', 'b', 'c'), $newItems->getFundList());
}
/**
* Test getFundList() in non-ILS mode.
*
* @return void
*/
public function testGetFundListWithoutILS()
{
$newItems = new NewItems(new Config(array('method' => 'solr')));
$this->assertEquals(array(), $newItems->getFundList());
}
/**
* Test a single hidden filter.
*
......@@ -167,6 +178,19 @@ class NewItemsTest extends TestCase
$this->assertEquals(2, $newItems->getResultPages());
}
/**
* Test illegal result pages setting.
*
* @return void
*/
public function testIllegalResultPages()
{
$config = new Config(array('result_pages' => '-2'));
$newItems = new NewItems($config);
// expect a default of 10 if a bad value was passed in
$this->assertEquals(10, $newItems->getResultPages());
}
/**
* Test Solr filter generator.
*
......
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