phpDocumentor ItemAdd
PHPUnit
[ class tree: ItemAdd ] [ index: ItemAdd ] [ all elements ]

Class: ItemAddFromServerTest

Source Location: /modules/itemadd/test/phpunit/ItemAddFromServerTest.class

Class ItemAddFromServerTest

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ItemAddPluginTestCase

ItemAddPluginTestCase::$_plugin

Inherited From GalleryTestCase

GalleryTestCase::$_cleanup

Inherited From ItemAddPluginTestCase

ItemAddPluginTestCase::ItemAddPluginTestCase()
ItemAddPluginTestCase::handleRequest()
ItemAddPluginTestCase::_translate()

Inherited From GalleryTestCase

GalleryTestCase::GalleryTestCase()
GalleryTestCase::assert()
GalleryTestCase::assertEquals()
GalleryTestCase::assertErrorEquals()
Fail if the provided GalleryStatus object does not contain the given error code.
GalleryTestCase::assertEventFired()
Fail if the provided event name was not fired.
GalleryTestCase::assertEventNotFired()
Fail if the provided event name was fired
GalleryTestCase::DeepCompare()
GalleryTestCase::failWithStatus()
This is deprecated in Gallery 2.3 -- now tests should just return $ret and let the framework generate the right failure message.
GalleryTestCase::getEntityCounter()
Get the entity counter listener which contains the types and number of elements deleted.
GalleryTestCase::setUp()
GalleryTestCase::tearDown()
GalleryTestCase::_array_unshift_key_value()
Utility method to array_unshift a single key => value pair.
GalleryTestCase::_becomeGuestUser()
GalleryTestCase::_createDerivative()
GalleryTestCase::_createLinkedItem()
Create a random link item
GalleryTestCase::_createRandomAlbum()
Create a random album
GalleryTestCase::_createRandomDataItem()
Create a random data item
GalleryTestCase::_createRandomGroup()
Create a random group
GalleryTestCase::_createRandomUser()
Create a random user
GalleryTestCase::_createUser()
GalleryTestCase::_deleteAndVerifyEntity()
GalleryTestCase::_disableUserName()
Convenience method to mark a username as disabled.
GalleryTestCase::_getRootId()
GalleryTestCase::_getUnusedId()
Get an id that is not used for anything.
GalleryTestCase::_initEventListenersForTest()
Disable all but some core event listeners by default.
GalleryTestCase::_markEventListenersForCleanup()
Create a backup of the registered event listeners which will be restored in tearDown.
GalleryTestCase::_markFactoryForCleanup()
Create a backup of the factory data which will be restored in tearDown.
GalleryTestCase::_markFactoryModuleForCleanup()
GalleryTestCase::_markForCleanup()
GalleryTestCase::_markPluginParametersForCleanup()
Store plugin parameters to be restored in tearDown
GalleryTestCase::_markToolkitForCleanup()
GalleryTestCase::_registerEventListener()
Register a The NullEventListener for a test
GalleryTestCase::_registerFactoryImplementationForTest()
Register a factory implementation temporarily for this test.
GalleryTestCase::_registerTestEventListener()
Register and event name and associated listener (deprecated).
GalleryTestCase::_setMarkupType()
Set core parameter for markup type.
GalleryTestCase::_signUrl()
Adds an authToken to the given URL
GalleryTestCase::_unregisterFactoryImplementationForTest()
Unregister a specific factory implementation or all implementations of a spefific type temporarily for this test.
GalleryTestCase::_verifyEntity()
GalleryTestCase::_verifyFields()
GalleryTestCase::_verifyMissing()

[ Top ]
Method Summary
ItemAddFromServerTest   ItemAddFromServerTest()  
void   setUp()  
void   tearDown()  
void   testAddChildrenFromLocalServer()  
void   testAddChildrenFromLocalServerRecursive()  
void   testAddChildrenFromLocalServerRecursiveSetSummaryDescription()  
void   testAddChildrenFromLocalServerRecursiveUsingSymlinkWithSymlinkNotSupported()  
void   testAddChildrenFromLocalServerRecursiveUsingSymlinkWithSymlinkSupported()  
void   testAddChildrenFromLocalServerSetTitle()  
void   testAddChildrenFromLocalServerSetTitleDescription()  
void   testAddChildrenFromLocalServerUsingSymlinkWithSymlinkNotSupported()  
void   testAddChildrenFromLocalServerUsingSymlinkWithSymlinkSupported()  
void   testAddDirectoryWithXssFilename()  
void   testAddFromLocalServerCallsIsAppropriate()  
void   testAddFromServerEntityDir()  
void   testAddFromServerFilenameToFields()   Checks if the urlencoded filename gets correctly converted to a nice filename
void   testAddFromServerG2DataDir()   Checks that we disallow recursive add from our own g2data directory.
void   testAddFromServerMalformedInput()  
void   testAddItemWithXssFilename()  
void   testInvalidLocalServerPath()  
void   testIsAppropriate()  
void   _testAddChildrenFromLocalServer()   All 'testAddChildrenFromLocalServer*' tests are very similar, hence

[ Top ]
Methods
Constructor ItemAddFromServerTest  [line 35]

  ItemAddFromServerTest ItemAddFromServerTest( $methodName  )

Parameters:
   $methodName: 


[ Top ]
setUp  [line 39]

  void setUp( )



Redefinition of:
GalleryTestCase::setUp()

[ Top ]
tearDown  [line 93]

  void tearDown( )



Redefinition of:
GalleryTestCase::tearDown()

[ Top ]
testAddChildrenFromLocalServer  [line 162]

  void testAddChildrenFromLocalServer( )



[ Top ]
testAddChildrenFromLocalServerRecursive  [line 202]

  void testAddChildrenFromLocalServerRecursive( )



[ Top ]
testAddChildrenFromLocalServerRecursiveSetSummaryDescription  [line 214]

  void testAddChildrenFromLocalServerRecursiveSetSummaryDescription( )



[ Top ]
testAddChildrenFromLocalServerRecursiveUsingSymlinkWithSymlinkNotSupported  [line 210]

  void testAddChildrenFromLocalServerRecursiveUsingSymlinkWithSymlinkNotSupported( )



[ Top ]
testAddChildrenFromLocalServerRecursiveUsingSymlinkWithSymlinkSupported  [line 206]

  void testAddChildrenFromLocalServerRecursiveUsingSymlinkWithSymlinkSupported( )



[ Top ]
testAddChildrenFromLocalServerSetTitle  [line 190]

  void testAddChildrenFromLocalServerSetTitle( )



[ Top ]
testAddChildrenFromLocalServerSetTitleDescription  [line 198]

  void testAddChildrenFromLocalServerSetTitleDescription( )



[ Top ]
testAddChildrenFromLocalServerUsingSymlinkWithSymlinkNotSupported  [line 182]

  void testAddChildrenFromLocalServerUsingSymlinkWithSymlinkNotSupported( )



[ Top ]
testAddChildrenFromLocalServerUsingSymlinkWithSymlinkSupported  [line 172]

  void testAddChildrenFromLocalServerUsingSymlinkWithSymlinkSupported( )



[ Top ]
testAddDirectoryWithXssFilename  [line 562]

  void testAddDirectoryWithXssFilename( )



[ Top ]
testAddFromLocalServerCallsIsAppropriate  [line 144]

  void testAddFromLocalServerCallsIsAppropriate( )



[ Top ]
testAddFromServerEntityDir  [line 511]

  void testAddFromServerEntityDir( )



[ Top ]
testAddFromServerFilenameToFields  [line 422]

  void testAddFromServerFilenameToFields( )

Checks if the urlencoded filename gets correctly converted to a nice filename

in pathComponent, title and summary



[ Top ]
testAddFromServerG2DataDir  [line 476]

  void testAddFromServerG2DataDir( )

Checks that we disallow recursive add from our own g2data directory.



[ Top ]
testAddFromServerMalformedInput  [line 494]

  void testAddFromServerMalformedInput( )



[ Top ]
testAddItemWithXssFilename  [line 533]

  void testAddItemWithXssFilename( )



[ Top ]
testInvalidLocalServerPath  [line 410]

  void testInvalidLocalServerPath( )



[ Top ]
testIsAppropriate  [line 105]

  void testIsAppropriate( )



[ Top ]
_testAddChildrenFromLocalServer  [line 229]

  void _testAddChildrenFromLocalServer( $useSymlink, [ $symlinkSupported = true], [ $addFiles = true], [ $addDirectories = false], [ $setTitle = false], [ $setSummary = false], [ $setDescription = false]  )

All 'testAddChildrenFromLocalServer*' tests are very similar, hence

they all run through this method. The two parameters to this method are: '$useSymlink', which is a boolean specifying if we should try to add the files using a symlink or not. The second param is '$shouldSucceed'. Since windows based OSes don't support symlinks, G2 will not support adding a file using symlinks on those OSes. We have two different mock platform objects, one that supports symlinks and one that does not. If we expect using a symlink to fail, we bail check for that condition, and then bail out immediately.

Parameters:
   $useSymlink: 
   $symlinkSupported: 
   $addFiles: 
   $addDirectories: 
   $setTitle: 
   $setSummary: 
   $setDescription: 


[ Top ]

Documentation generated on Fri, 08 Oct 2010 05:23:47 -0700 by phpDocumentor 1.3.0RC6