From d5a58287e8999d144c598db18c8e4505751b1713 Mon Sep 17 00:00:00 2001 From: Alex Arnaud <alex.arnaud@biblibre.com> Date: Fri, 20 Feb 2015 13:42:59 +0100 Subject: [PATCH] Hotline#21534 - Fix user group tests --- tests/library/Class/UserGroupTest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/library/Class/UserGroupTest.php b/tests/library/Class/UserGroupTest.php index b5f5b51d733..7a18a8ea87b 100644 --- a/tests/library/Class/UserGroupTest.php +++ b/tests/library/Class/UserGroupTest.php @@ -54,7 +54,11 @@ abstract class UserGroupsTestCase extends Storm_Test_ModelTestCase { 'user' => $this->_florence, 'user_group'=> $this->_stagiaires]); - $this->_stagiaires->setUsers([$this->_florence, $this->_agnes])->save(); + $this->_agnes_stagiaires_membership = $this->fixture('Class_UserGroupMembership', + ['id' => 124, + 'user' => $this->_agnes, + 'user_group'=> $this->_stagiaires]); + $this->_florence->setUserGroupMemberships([$this->_florence_stagiaires_membership])->save(); } } @@ -251,6 +255,7 @@ class UserGroupWithCategorieAssociationTest extends UserGroupsTestCase { +/** @see http://forge.afi-sa.fr/issues/21534 */ class UserGroupDeletionTest extends UserGroupsTestCase { protected $_jeanleguin; protected $_humoristes; @@ -275,8 +280,7 @@ class UserGroupDeletionTest extends UserGroupsTestCase { 'user' => $this->_jeanleguin, 'user_group'=> $this->_humoristes]); - Class_UserGroup::beVolatile(); - Class_UserGroup::find(54)->delete(); + $this->_humoristes->delete(); } -- GitLab