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

hotline #68975 test fix

parent 7b015f55
Branches
Tags
3 merge requests!2464Master,!2463Hotline master,!2458hotline #68975 fix article back button after save
Pipeline #3238 passed with stage
in 25 minutes and 13 seconds
......@@ -68,7 +68,11 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
? $this->_bib->getId()
: null);
$id_cat = ($article = Class_Article::find($this->_getParam('id')))
$article = ($id_article = $this->_getParam('id', null))
? Class_Article::find($id_article)
: null;
$id_cat = $article
? $article->getIdCat()
: $this->_getParam('id_cat', 0);
......
......@@ -366,6 +366,7 @@ class CmsControllerListModeAdminBibSearchTest extends CmsControllerListModeTestC
'order' => 'titre',
'limitPage' => [0, 25]])
->answers([Class_Article::find(1)])
->whenCalled('countBy')
->with(['where' => '(titre like \'%news%\')',
'id_cat' => [1,23,34],
......@@ -377,19 +378,19 @@ class CmsControllerListModeAdminBibSearchTest extends CmsControllerListModeTestC
$this->dispatch('/admin/cms/index/title_search/news', true);
}
/** @test */
public function upButtonInTitleShouldBeUrlWithOrderTitle() {
$this->assertXPath('//th//a[contains(@href,"/admin/cms/index/title_search/news/order/titre")]',$this->_response->getBody());
}
/** @test */
/** @test */
public function downButtonInTitleShouldBeUrlWithOrderTitleDesc() {
$this->assertXPath('//th//a[contains(@href,"/admin/cms/index/title_search/news/order/titre+desc")]',$this->_response->getBody());
}
/** @test */
public function newsFromPortailShouldNotBePresent() {
$this->assertNotXPathContentContains('//td', 'News from portail');
......@@ -512,6 +513,7 @@ class CmsControllerListModeSearchPostFormTest extends CmsControllerListModeTestC
class CmsControllerListModeBackToIndexFromArticlesConcertTest extends CmsControllerListModeTestCase {
public function setUp() {
parent::setUp();
......
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