Skip to content
Snippets Groups Projects
Commit eb4cc6da authored by llaffont's avatar llaffont
Browse files

Correction test catalogue

parent 3dcb9680
Branches
Tags
No related merge requests found
......@@ -29,14 +29,17 @@ class CatalogueControllerAppelMenuTest extends AbstractControllerTestCase {
$this->_sql = Zend_Registry::get('sql');
$this->_sql_mock = Storm_Test_ObjectWrapper::mock()
->whenCalled('fetchOne')
->answers(null)
->whenCalled('fetchOne')
->answers(null)
->whenCalled('execute')
->answers(null)
->whenCalled('fetchAll')
->answers([]);
->whenCalled('fetchAll')
->answers([]);
Zend_Registry::set('sql', $this->_sql_mock);
Class_Catalogue::newInstanceWithId(151, ['libelle' => 'Nouveautés',
'type_doc' => '1;3;4;5']);
}
......@@ -61,13 +64,7 @@ class CatalogueControllerAppelMenuTest extends AbstractControllerTestCase {
* @test
*/
public function getFacettesSqlError() {
$catalogue_test = Class_Catalogue::getLoader()
->newInstanceWithId(151)
->setLibelle('nouveautés')
->setTypeDoc('1;3;4;5');
$this->_dispatchQuery('titre=Catalogue&aleatoire=0&tri=1&nb_notices=+&nb_analyse=&id_catalogue=151&id_panier=0&id_user=0&reset=true');
$this->assertXPathContentContains('//h1', 'Catalogue');
}
......@@ -82,7 +79,7 @@ class CatalogueControllerAppelMenuTest extends AbstractControllerTestCase {
/** @test */
public function withOldAppelMenuShouldRedirectToRechercheSimple() {
$this->dispatch('/recherche/appelmenu?id_catalogue=12',true);
$this->dispatch('/recherche/appelmenu?id_catalogue=151',true);
$this->assertXPathContentContains('//h1', 'Nouveautés',$this->_response->getBody());
}
......
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