diff options
Diffstat (limited to 'site/app/tests/controllers/search_controller.test.php')
-rw-r--r-- | site/app/tests/controllers/search_controller.test.php | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/site/app/tests/controllers/search_controller.test.php b/site/app/tests/controllers/search_controller.test.php index 110be38..3ed6709 100644 --- a/site/app/tests/controllers/search_controller.test.php +++ b/site/app/tests/controllers/search_controller.test.php @@ -50,23 +50,14 @@ class SearchTest extends UnitTestCase { function testLoad() { $this->helper = new UnitTestHelper(); - $this->controller =& $this->helper->getController('Search', $this); + $this->controller = $this->helper->getController('Search', $this); $this->helper->mockComponents($this->controller, $this); - - // real SearchComponent for real (simple) searches - loadComponent('Search'); - $this->controller->Search =& new SearchComponent(); - $this->controller->Search->startup($this->controller); } function runSimpleSearch($terms) { return $this->controller->Search->search($terms); } - function runSimpleCollectionSearch($terms) { - return $this->controller->Search->searchCollections($terms); - } - function testSearchHandlesInvalidInput() { // a throwaway test - just making sure if we pass in an invalid // value, it comes back as an array anyway @@ -121,20 +112,5 @@ class SearchTest extends UnitTestCase { $results_quoted = $this->runSimpleSearch('"MicroFormat Adds detection"'); $this->assertTrue(!empty($results_unquoted) && empty($results_quoted), "quoted search returns nothing for query that matches when unquoted"); } - - function testUsesFile() { - $this->assertTrue(in_array('File', $this->controller->uses), - 'The File model is available on the controller'); - } - - function testSearchCollectionName() { - $results = $this->runSimpleCollectionSearch('name'); - $this->assertTrue(!empty($results), "found results for collection name match"); - } - - function testSearchCollectionDescription() { - $results = $this->runSimpleCollectionSearch('description'); - $this->assertTrue(!empty($results), "found results for collection description match"); - } } ?> |