Skip to content
Snippets Groups Projects
Commit 82f98bca authored by Laurent's avatar Laurent
Browse files

dev #29558 improve search performances

Better navigation / pagination test
parent 8b9de173
2 merge requests!1146Dev#29558 improve search performances,!1130Dev#29558 improve search performances
......@@ -31,21 +31,21 @@ class ListesNoticesTest extends Storm_Test_ModelTestCase {
$this->_mock_sql = $this->mock()
->whenCalled('fetchAllByColumn')
->with('select * from notices')
->answers([4, 10, 23])
->answers(range(1, 50))
->beStrict();
Zend_Registry::set('sql', $this->_mock_sql);
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Notice')
->whenCalled('findAllBy')
->with(['id_notice' => [4, 10, 23],
'order' => 'FIELD(id_notice, 4,10,23)'])
->with(['id_notice' => range(1, 10),
'order' => 'FIELD(id_notice, 1,2,3,4,5,6,7,8,9,10)'])
->answers('notices');
}
public function tearDown() {
Zend_Registry::set('sql', $this->_original_sql);
Zend_Registry::set('sql',$this->_original_sql);
parent::tearDown();
}
......
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