mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixing unit test to restore extensions after test
This commit is contained in:
parent
5cbd2dbeb4
commit
e73d28b24e
@ -47,6 +47,7 @@ class CMSProfileControllerTest extends FunctionalTest {
|
||||
}
|
||||
|
||||
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 @@ class CMSProfileControllerTest extends FunctionalTest {
|
||||
$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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user