diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php index f03094c8b8ed5b08481439b28b16c4813d68ed4a..f8eaa45234fbaa6f9f770e1a7660cc64aac876d7 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php @@ -94,6 +94,22 @@ class HistoryTest extends TestCase ); } + /** + * Test that purging history proxies to the right place. + * + * @return void + */ + public function testPurgeHistory() + { + $table = $this->getMockBuilder(\VuFind\Db\Table\Search::class) + ->disableOriginalConstructor()->setMethods(['destroySession']) + ->getMock(); + $table->expects($this->once())->method('destroySession') + ->with($this->equalTo('foosession'), $this->equalTo(1234)); + $history = $this->getHistory($table); + $history->purgeSearchHistory(1234); + } + /** * Get object for testing. *