Skip to content
Snippets Groups Projects

Master

Merged Laurent requested to merge master into WIP
Viewing commit 66b6c013
Show latest version
2 files
+ 29
13
Preferences
Compare changes
Files
2
@@ -160,6 +160,16 @@ class CmsControllerListModeAdminBibSubCategoryTest
'titre' => 'Wtf',
'contenu' => 'Welcome',
'id_cat' => 1]);
$other_cat = $this->fixture('Class_ArticleCategorie',
['id' => 2,
'libelle' => 'Lyrics',
'parent_categorie' => $this->root_category,
]);
$other_cat->setBib($this->annecy);
$group = Class_UserGroup::find(22);
Class_ArticleCategorie::find(23)->setLibelle('Modes')->save();
Class_Permission::createArticle()->permitTo($group, $other_cat);
Class_Permission::createArticleCategory()->permitTo($group, $other_cat);
$this->dispatch('/admin/cms/index/id_cat/1', true);
}
@@ -168,7 +178,7 @@ class CmsControllerListModeAdminBibSubCategoryTest
/** @test */
public function shouldDisplayLibraryInBreadcrumbAtRoot() {
$this->assertXPathContentContains('//a[contains(@href, "admin/cms")]',
'Annecy');
'Annecy',$this->_response->getBody());
}
@@ -179,9 +189,16 @@ class CmsControllerListModeAdminBibSubCategoryTest
/** @test */
public function shouldDisplayALaUneCategory() {
$this->assertXPathContentContains('//td/a[contains(@href, "cms/index/id_cat/23")]',
'A la Une');
public function shouldDisplayModesCategory() {
$this->assertXPathContentContains('//tr[2]//td/a[1][contains(@href, "cms/index/id_cat/23")]',
'Modes');
}
/** @test */
public function shouldDisplayLyricsCategoryBeforeModes() {
$this->assertXPathContentContains('//tr[1]//td/a[1][contains(@href, "cms/index/id_cat/2")]',
'Lyrics');
}