Skip to content
Snippets Groups Projects
Commit 800cd554 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #17514 fix test failure

parent 33953c28
5 merge requests!715Master,!686Dev#17514 indexation refactoring,!649Dev#19675 improve display articles and sito in kiosque,!630Dev#17514 indexation refactoring,!618Dev #17514 indexation paniers domaines
......@@ -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
*/
require_once 'AdminAbstractControllerTestCase.php';
......@@ -25,34 +25,34 @@ abstract class SitothequeControllerTestCase extends Admin_AbstractControllerTest
public function setUp() {
parent::setUp();
$this->setupDomaines();
Class_Notice::beVolatile();
Class_CodifThesaurus::beVolatile();
$categorie_informations = $this->fixture('Class_SitothequeCategorie',
['id' => 2,
['id' => 2,
'libelle' => 'Informations',
'id_site' => 3,
'sous_categories' => [],
'sitotheques' => [
$this->fixture('Class_Sitotheque',
['id' => 22,
['id' => 22,
'titre' => 'Le Canard',
'url' => 'http://www.canard.fr',
'description' => 'indépendant',
'domaine_ids' => [10]]),
$this->_le_monde = $this->fixture('Class_Sitotheque',
['id' => 23,
['id' => 23,
'titre' => 'Le Monde',
'url' => 'http://www.monde.fr'])]
]);
$bib_annecy = $this->fixture('Class_Bib',
['id' => 3,
['id' => 3,
'libelle' => 'Annecy',
'sitotheque_categories' => [$categorie_informations]]);
......@@ -94,7 +94,7 @@ class SitothequeControllerIndexTest extends SitothequeControllerTestCase {
$this->dispatch('/admin/sito/index/id/5/id_cat/34', true);
}
/** @test */
public function pageShouldContainsDivTreeView() {
$this->assertXPath('//div[@class="treeView"]');
......@@ -107,7 +107,7 @@ class SitothequeControllerIndexTest extends SitothequeControllerTestCase {
'Ajouter une catégorie');
}
/** @test */
public function liWithSiteLeCanardShouldBePresent() {
$this->assertXPathContentContains('//ul/li[1]//div', 'Le Canard');
......@@ -154,9 +154,9 @@ class SitothequeControllerSitoEditTest extends SitothequeControllerTestCase {
}
/**
/**
* @group integration
* @test
* @test
*/
public function pageShouldBeHtml5Valid() {
$this->assertHTML5();
......@@ -168,7 +168,7 @@ class SitothequeControllerSitoEditTest extends SitothequeControllerTestCase {
$this->assertXPathContentContains('//textarea[@name="description"]', 'indépendant');
}
/** @test */
public function formShouldActionShouldBeSitoEditId22() {
$this->assertXPath('//form[contains(@action, "admin/sito/sitoedit/id/22")]',
......@@ -198,7 +198,7 @@ class SitothequeControllerSitoViewTest extends SitothequeControllerTestCase {
$this->dispatch('/admin/sito/sitoview/id/22', true);
}
/** @test */
public function responseShouldRedirectToCanardFr() {
$this->assertRedirectTo('http://www.canard.fr');
......@@ -236,11 +236,11 @@ class SitothequeControllerPostAddActionTest extends SitothequeControllerTestCase
$this->cache = Storm_Test_ObjectWrapper::mock()->whenCalled('clean')->answers(true);
Storm_Cache::setDefaultZendCache($this->cache);
$this->postDispatch('/admin/sito/sitoadd/id_cat/2',
$this->postDispatch('/admin/sito/sitoadd/id_cat/2',
['titre' => 'google',
'url' => 'http://www.google.fr',
'id_items' => '23-23',
'domaine_ids' => 10],
'domaine_ids' => 10],
true);
}
......@@ -272,7 +272,7 @@ class SitothequeControllerPostAddActionTest extends SitothequeControllerTestCase
/** @test */
public function pseudoNoticeShouldHaveIndexForTypeDocAndDomaineHistoire() {
$this->assertEquals('T10 HC0001', Class_Notice::find(1)->getFacettes());
$this->assertContains('T10 HC0001', Class_Notice::find(1)->getFacettes());
}
/** @test */
......@@ -302,7 +302,7 @@ class SitothequeControllerInvalidPostActionTest extends SitothequeControllerTest
class SitothequeControllerSitoPostEditLeMondeTest extends SitothequeControllerTestCase {
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/sito/sitoedit/id/23',
$this->postDispatch('/admin/sito/sitoedit/id/23',
['titre' => 'Times'],
true);
Class_Sitotheque::clearCache();
......@@ -364,7 +364,7 @@ class SitothequeControllerActionErrorsTest extends SitothequeControllerTestCase
*/
public function responseShouldRedirectToIndex($url) {
$this->dispatch($url, true);
$this->assertRedirectTo('/admin/sito');
$this->assertRedirectTo('/admin/sito');
}
}
......@@ -396,7 +396,7 @@ class SitothequeControllerEditCategorieInformationsTest extends SitothequeContro
class SitothequeControllerPostEditCategorieInformationsTest extends SitothequeControllerTestCase {
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/sito/catedit/id/2',
$this->postDispatch('/admin/sito/catedit/id/2',
['libelle' => 'News'],
true);
Class_SitothequeCategorie::clearCache();
......@@ -438,7 +438,7 @@ class SitothequeControllerAddCategorieTest extends SitothequeControllerTestCase
class SitothequeControllerPostAddEmptyCategorieTest extends SitothequeControllerTestCase {
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/sito/catadd/id/2',
$this->postDispatch('/admin/sito/catadd/id/2',
['libelle' => ''],
true);
}
......@@ -459,7 +459,7 @@ class SitothequeControllerPostAddCategorieNationalesTest extends SitothequeContr
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/sito/catadd/id/2',
$this->postDispatch('/admin/sito/catadd/id/2',
['libelle' => 'Nationales'],
true);
......@@ -482,7 +482,7 @@ class SitothequeControllerPostAddCategorieInBibTest extends SitothequeController
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/sito/catadd/id_bib/5',
$this->postDispatch('/admin/sito/catadd/id_bib/5',
['libelle' => 'Dans la bib'],
true);
......
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