From fd1d29f40a50afeb1928be5c5bb1904d682c962c Mon Sep 17 00:00:00 2001 From: gloas <gloas@afi-sa.fr> Date: Wed, 20 Sep 2017 09:42:23 +0200 Subject: [PATCH] dev #65075 fix test to use file manager feature --- .../controllers/FeatureControllerTest.php | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/application/modules/admin/controllers/FeatureControllerTest.php b/tests/application/modules/admin/controllers/FeatureControllerTest.php index 0515859b09a..c0c24082437 100644 --- a/tests/application/modules/admin/controllers/FeatureControllerTest.php +++ b/tests/application/modules/admin/controllers/FeatureControllerTest.php @@ -21,6 +21,8 @@ class FeatureControllerIndexDispatchTest extends Admin_AbstractControllerTestCase { + protected $_storm_default_to_volatile = true; + public function setUp() { parent::setUp(); $this->dispatch('/admin/feature/index', true); @@ -28,26 +30,26 @@ class FeatureControllerIndexDispatchTest extends Admin_AbstractControllerTestCas /** @test */ - public function skinChangeShouldBeAnEwFeature() { - $this->assertXPathContentContains('//td', 'changer la personnalisation de votre OPAC'); + public function fileManagerShouldBeANewFeature() { + $this->assertXPathContentContains('//td', 'Explorateur de fichier'); } /** @test */ - public function skinChangeTryShouldBePresent() { - $this->assertXPath('//td//a[contains(@href, "/admin/skin/index")]'); + public function tryFileManagerLinkShouldBePresent() { + $this->assertXPath('//td//a[contains(@href, "/admin/file-manager/")]'); } /** @test */ - public function skinChangeWikiShouldBePresent() { + public function fileManagerWikiLinkShouldBePresent() { $this->assertXPath('//td//a[contains(@href, "/wiki")]'); } /** @test */ - public function skinChangeHideShouldBePresent() { - $this->assertXPath('//td//a[contains(@href, "/admin/feature/hide")]'); + public function fileManagerHideShouldBePresent() { + $this->assertXPath('//td//a[contains(@href, "/admin/feature/hide/id/61314")]'); } } @@ -67,7 +69,7 @@ class FeatureControllerHideDispatchTest extends Admin_AbstractControllerTestCase 'password' => 123, 'role_level' => ZendAfi_Acl_AdminControllerRoles::SUPER_ADMIN])); - $this->dispatch('/admin/feature/hide/id/64573', true); + $this->dispatch('/admin/feature/hide/id/61314', true); } @@ -84,8 +86,8 @@ class FeatureControllerHideDispatchTest extends Admin_AbstractControllerTestCase /** @test */ - public function userCheckedFeatureShouldContains64573() { - $this->assertEquals(64573, (new Class_Feature)->findCheckedBy(Class_Users::getIdentity())[0]->getid()); + public function userCheckedFeatureShouldContains61314() { + $this->assertEquals(61314, (new Class_Feature)->findCheckedBy(Class_Users::getIdentity())[0]->getid()); } } @@ -107,10 +109,10 @@ class FeatureControllerShowDispatchTest extends Admin_AbstractControllerTestCase 'role_level' => ZendAfi_Acl_AdminControllerRoles::SUPER_ADMIN])); (new Class_User_Settings(Class_Users::getIdentity())) - ->addCheckedFeature(64573) + ->addCheckedFeature(61314) ->save(); - $this->dispatch('/admin/feature/show/id/64573', true); + $this->dispatch('/admin/feature/show/id/61314', true); } @@ -127,13 +129,13 @@ class FeatureControllerShowDispatchTest extends Admin_AbstractControllerTestCase /** @test */ - public function userCheckedFeatureShouldNotContains64573() { + public function userCheckedFeatureShouldNotContains61314() { $this->assertEmpty((new Class_Feature)->findCheckedBy(Class_Users::getIdentity())); } /** @test */ - public function feature64573ShouldAppearAsNewForUser() { - $this->assertEquals(64573, (new Class_Feature)->findNewFor(Class_Users::getIdentity())[0]->getid()); + public function feature61314ShouldAppearAsNewForUser() { + $this->assertEquals(61314, (new Class_Feature)->findNewFor(Class_Users::getIdentity())[0]->getid()); } } \ No newline at end of file -- GitLab