Skip to content
Snippets Groups Projects
Commit 72b82fba authored by Matthias Meusburger's avatar Matthias Meusburger
Browse files

hotline#28472: Add tests.

parent c96ead02
Branches
Tags
4 merge requests!1132Hotline#29412 images des articles dans le resultat de recherche,!1046Master,!1045Hotline master,!1042Hotline#28472 fix add box in front
......@@ -1135,3 +1135,41 @@ class AccueilControllerKiosqueWidgetWithFlashSettingsSavedAndJsSelectedTest exte
$this->assertNotXPath('//tr[@style="display: none"]//select[@name="profil_redirect"]');
}
}
class AccueilControllerAddBoxInFrontTest extends AccueilControllerConfigBoiteLoginTestCase {
protected $profil;
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/accueil/add-block', ['division' => 4,
'module_type' => 'KIOSQUE',
'id_module' => 32,
'titre' => 'mon titre',
'boite' => '',
]);
$id_profil = Class_Profil::getCurrentProfil()->getId();
Class_Profil::clearCache();
$this->profil = Class_Profil::find($id_profil);
}
/** @test */
public function currentProfilShouldHaveTitre() {
$this->assertEquals('mon titre', $this->profil->getCfgAccueilAsArray()['modules'][1]['preferences']['titre']);
}
/** @test */
public function currentProfilShouldHaveTypeKiosque() {
$this->assertEquals('KIOSQUE', $this->profil->getCfgAccueilAsArray()['modules'][1]['type_module']);
}
/** @test */
public function currentProfilShouldHaveSlideShow() {
$this->assertEquals('slide_show', $this->profil->getCfgAccueilAsArray()['modules'][1]['preferences']['style_liste']);
}
/** @test */
public function currentProfilShouldHaveNbNotices() {
$this->assertEquals(20, $this->profil->getCfgAccueilAsArray()['modules'][1]['preferences']['nb_notices']);
}
}
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