Skip to content
Snippets Groups Projects
Commit 8baf4a17 authored by Laurent's avatar Laurent
Browse files

dev #22209 search result feed

reification of Search Result - test fix
parent fdc7aae5
Branches
Tags
3 merge requests!1132Hotline#29412 images des articles dans le resultat de recherche,!1027Dev#22209 search result feed,!1026Dev#22209 search result feed
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class ZendAfi_View_Helper_Notice_NavigationTestCase extends ViewHelperTestCase {
......@@ -28,14 +28,17 @@ abstract class ZendAfi_View_Helper_Notice_NavigationTestCase extends ViewHelperT
$this->_helper = new ZendAfi_View_Helper_Notice_Navigation();
$this->_helper->setView(new ZendAfi_Controller_Action_Helper_View());
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Notice')
->whenCalled('getNoticeIdsByRequeteRecherche')
->answers([10,99,88,1,2,34,4]);
$mock_moteur = Storm_Test_ObjectWrapper::mock()
$mock_moteur = Storm_Test_ObjectWrapper::mock();
$mock_moteur
->whenCalled('lancerRecherche')
->answers(['req_liste' => 'select * from notices']);
->answers((new Class_MoteurRecherche_Result($mock_moteur,
new Class_CriteresRecherche()))
->setRecordsQuery('select * from notices'));
$this->notice_navigation = new Class_Notice_NavigationRecherche(new Class_CriteresRecherche(),
$mock_moteur,
......@@ -68,7 +71,7 @@ class ZendAfi_View_Helper_Notice_Navigation_MiddleTest extends ZendAfi_View_Help
/** @test */
public function nombreTotalShouldContains4slash7() {
$this->assertXPathcontentContains($this->_html,'//div//span','4 sur 7');
}
}
}
......@@ -87,7 +90,7 @@ class ZendAfi_View_Helper_Notice_Navigation_BeginTest extends ZendAfi_View_Helpe
/** @test */
public function resultatPrecedentShouldNotBeVisible() {
$this->assertNotXPath($this->_html,
'//div//a[@id="previousrecord"]',
'//div//a[@id="previousrecord"]',
$this->_html);
}
......@@ -113,7 +116,7 @@ class ZendAfi_View_Helper_Notice_Navigation_EndTest extends ZendAfi_View_Helper_
/** @test */
public function resultatPrecedentShouldLinkToNavigationPrecedent() {
$this->assertXPath($this->_html,
'//div//a[contains(@href, "navigation/precedent")][@id="previousrecord"][@title="Document précédent"]',
'//div//a[contains(@href, "navigation/precedent")][@id="previousrecord"][@title="Document précédent"]',
$this->_html);
}
......@@ -122,7 +125,7 @@ class ZendAfi_View_Helper_Notice_Navigation_EndTest extends ZendAfi_View_Helper_
$this->assertXPathcontentContains($this->_html,'//div//span','7 sur 7');
}
}
?>
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