Permalink
Browse files

Fixing unit test to restore extensions after test

  • Loading branch information...
1 parent 5cbd2db commit e73d28b24e6a2e7a363621e4143e76a05d25893b @halkyon halkyon committed Sep 10, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/control/CMSProfileControllerTest.php
@@ -47,6 +47,7 @@ public function testMemberEditsOwnProfile() {
}
public function testExtendedPermissionsStopEditingOwnProfile() {
+ $existingExtensions = Config::inst()->get('Member', 'extensions');
Config::inst()->update('Member', 'extensions', array('CMSProfileControllerTestExtension'));
$member = $this->objFromFixture('Member', 'user1');
@@ -66,6 +67,9 @@ public function testExtendedPermissionsStopEditingOwnProfile() {
$member = $this->objFromFixture('Member', 'user1');
$this->assertNotEquals($member->FirstName, 'JoeEdited', 'FirstName field was NOT changed because we modified canEdit');
+
+ Config::inst()->remove('Member', 'extensions');
+ Config::inst()->update('Member', 'extensions', $existingExtensions);
}
}

0 comments on commit e73d28b

Please sign in to comment.