From 4703aa6e8154b5458568ef2bcf2e7bb11adec5bf Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 14 Apr 2010 04:41:30 +0000 Subject: [PATCH] MINOR Fixed SapphireTest->logInWithPermission() spelling (from r99491) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102866 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- dev/SapphireTest.php | 4 ++-- tests/FileLinkTrackingTest.php | 2 +- tests/SiteTreeActionsTest.php | 2 +- tests/SiteTreeBacklinksTest.php | 2 +- tests/SiteTreeBrokenLinksTest.php | 4 ++-- tests/SiteTreePermissionsTest.php | 8 ++++---- tests/SiteTreeTest.php | 8 ++++---- tests/control/ContentControllerTest.php | 4 ++-- tests/model/VirtualPageTest.php | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 70f537b91..8b75ea719 100755 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -142,7 +142,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase { $i++; } - $this->logInWithPermssion("ADMIN"); + $this->logInWithPermission("ADMIN"); } // Set up email @@ -681,7 +681,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase { * Create a member and group with the given permission code, and log in with it. * Returns the member ID. */ - function logInWithPermssion($permCode = "ADMIN") { + function logInWithPermission($permCode = "ADMIN") { if(!isset($this->cache_generatedMembers[$permCode])) { $group = new Group(); $group->Title = "$permCode group"; diff --git a/tests/FileLinkTrackingTest.php b/tests/FileLinkTrackingTest.php index 287b54045..fdc05e9be 100644 --- a/tests/FileLinkTrackingTest.php +++ b/tests/FileLinkTrackingTest.php @@ -8,7 +8,7 @@ class FileLinkTrackingTest extends SapphireTest { function setUp() { parent::setUp(); - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); touch(Director::baseFolder() . '/assets/testscript-test-file.pdf'); } function tearDown() { diff --git a/tests/SiteTreeActionsTest.php b/tests/SiteTreeActionsTest.php index da101754d..2c39b30e9 100644 --- a/tests/SiteTreeActionsTest.php +++ b/tests/SiteTreeActionsTest.php @@ -53,7 +53,7 @@ class SiteTreeActionsTest extends FunctionalTest { function testActionsNoDeletePublishedRecord() { if(class_exists('SiteTreeCMSWorkflow')) return true; - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $page = new SiteTreeActionsTest_Page(); $page->CanEditType = 'LoggedInUsers'; diff --git a/tests/SiteTreeBacklinksTest.php b/tests/SiteTreeBacklinksTest.php index 5426b460e..82993c8fb 100644 --- a/tests/SiteTreeBacklinksTest.php +++ b/tests/SiteTreeBacklinksTest.php @@ -20,7 +20,7 @@ class SiteTreeBacklinksTest extends SapphireTest { // Log in as admin so that we don't run into permission issues. That's not what we're // testing here. - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); } function testSavingPageWithLinkAddsBacklink() { diff --git a/tests/SiteTreeBrokenLinksTest.php b/tests/SiteTreeBrokenLinksTest.php index 1051b1234..5f96f0e96 100644 --- a/tests/SiteTreeBrokenLinksTest.php +++ b/tests/SiteTreeBrokenLinksTest.php @@ -71,7 +71,7 @@ class SiteTreeBrokenLinksTest extends SapphireTest { } function testDeletingMarksBackLinkedPagesAsBroken() { - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); // Set up two published pages with a link from content -> about $linkDest = $this->objFromFixture('Page','about'); @@ -113,7 +113,7 @@ class SiteTreeBrokenLinksTest extends SapphireTest { } function testPublishingSourceBeforeDestHasBrokenLink() { - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); // Set up two draft pages with a link from content -> about $linkDest = $this->objFromFixture('Page','about'); diff --git a/tests/SiteTreePermissionsTest.php b/tests/SiteTreePermissionsTest.php index 06d427fab..6949ad325 100755 --- a/tests/SiteTreePermissionsTest.php +++ b/tests/SiteTreePermissionsTest.php @@ -32,7 +32,7 @@ class SiteTreePermissionsTest extends FunctionalTest { function testPermissionCheckingWorksOnDeletedPages() { // Set up fixture - a published page deleted from draft - $this->logInWithPermssion("ADMIN"); + $this->logInWithPermission("ADMIN"); $page = $this->objFromFixture('Page','restrictedEditOnlySubadminGroup'); $pageID = $page->ID; $this->assertTrue($page->doPublish()); @@ -58,7 +58,7 @@ class SiteTreePermissionsTest extends FunctionalTest { function testPermissionCheckingWorksOnUnpublishedPages() { // Set up fixture - an unpublished page - $this->logInWithPermssion("ADMIN"); + $this->logInWithPermission("ADMIN"); $page = $this->objFromFixture('Page','restrictedEditOnlySubadminGroup'); $pageID = $page->ID; $page->doUnpublish(); @@ -80,7 +80,7 @@ class SiteTreePermissionsTest extends FunctionalTest { function testCanEditOnPageDeletedFromStageAndLiveReturnsFalse() { // Find a page that exists and delete it from both stage and published - $this->logInWithPermssion("ADMIN"); + $this->logInWithPermission("ADMIN"); $page = $this->objFromFixture('Page','restrictedEditOnlySubadminGroup'); $pageID = $page->ID; $page->doUnpublish(); @@ -336,7 +336,7 @@ class SiteTreePermissionsTest extends FunctionalTest { $page = $this->objFromFixture('Page', 'restrictedEditLoggedInUsers'); $pageID = $page->ID; - $this->logInWithPermssion("ADMIN"); + $this->logInWithPermission("ADMIN"); $page->doPublish(); $page->deleteFromStage('Stage'); diff --git a/tests/SiteTreeTest.php b/tests/SiteTreeTest.php index 654aecd8c..c90976017 100755 --- a/tests/SiteTreeTest.php +++ b/tests/SiteTreeTest.php @@ -94,7 +94,7 @@ class SiteTreeTest extends SapphireTest { * Test that field which are set and then cleared are also transferred to the published site. */ function testPublishDeletedFields() { - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $obj = $this->objFromFixture('Page', 'about'); $obj->MetaTitle = "asdfasdf"; @@ -334,7 +334,7 @@ class SiteTreeTest extends SapphireTest { function testDeleteFromLiveOperatesRecursively() { SiteTree::set_enforce_strict_hierarchy(false); - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $pageAbout = $this->objFromFixture('Page', 'about'); $pageAbout->doPublish(); @@ -356,7 +356,7 @@ class SiteTreeTest extends SapphireTest { function testUnpublishDoesNotDeleteChildrenWithLooseHierachyOn() { SiteTree::set_enforce_strict_hierarchy(false); - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $pageAbout = $this->objFromFixture('Page', 'about'); $pageAbout->doPublish(); @@ -378,7 +378,7 @@ class SiteTreeTest extends SapphireTest { function testDeleteFromLiveOperatesRecursivelyStrict() { - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $pageAbout = $this->objFromFixture('Page', 'about'); $pageAbout->doPublish(); diff --git a/tests/control/ContentControllerTest.php b/tests/control/ContentControllerTest.php index cadf0ef05..51cd77bcd 100755 --- a/tests/control/ContentControllerTest.php +++ b/tests/control/ContentControllerTest.php @@ -93,12 +93,12 @@ class ContentControllerTest extends FunctionalTest { public function testViewDraft(){ // test when user does not have permission, should get login form - $this->logInWithPermssion('EDITOR'); + $this->logInWithPermission('EDITOR'); $this->assertEquals('403', $this->get('/contact/?stage=Stage')->getstatusCode()); // test when user does have permission, should show page title and header ok. - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $this->assertEquals('200', $this->get('/contact/?stage=Stage')->getstatusCode()); diff --git a/tests/model/VirtualPageTest.php b/tests/model/VirtualPageTest.php index 100900b6b..936431f10 100644 --- a/tests/model/VirtualPageTest.php +++ b/tests/model/VirtualPageTest.php @@ -30,7 +30,7 @@ class VirtualPageTest extends SapphireTest { * virtual pages are published */ function testPublishingSourcePagePublishesAlreadyPublishedVirtualPages() { - $this->logInWithPermssion('ADMIN'); + $this->logInWithPermission('ADMIN'); $master = $this->objFromFixture('Page', 'master'); $master->doPublish();