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

Class: PlatformTest

Source Location: /modules/core/test/phpunit/PlatformTest.class

Class PlatformTest

Class Overview

Test platform functionality.

Located in /modules/core/test/phpunit/PlatformTest.class [line 33]

TestCase
   |
   --GalleryTestCase
      |
      --PlatformTest

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryTestCase

GalleryTestCase::$_cleanup

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
PlatformTest   PlatformTest()  
void   ignore_error_handler()  
void   setUp()  
void   tearDown()  
void   testAtomicWrite()  
void   testChdir()  
void   testCopy()  
void   testExec()   Make sure executing a bogus path fails.
void   testExecWithSpaceInG2DataPath()   Verify bugfix: quotes around redirect file for stderr output, in case path has a space
void   testFile()  
void   testFileExists()  
void   testFileGetAndPutContents()  
void   testFilesize()  
void   testFopen()  
void   testFsockopen()   Try opening a socket to the current web server.
void   testFsockopenBadHost()   Try opening a socket to a bogus web server.
void   testGetDirectorySeparator()  
void   testGetLineEnding()  
void   testIsDir()  
void   testIsExecutable()  
void   testIsFile()  
void   testIsLegalPathComponent()  
void   testIsLegalPathComponentForAllowedExtension()  
void   testIsLegalPathComponentForBlacklistedExtension()  
void   testIsLegalPathComponentWithDotForDirectory()  
void   testIsLink()  
void   testIsReadable()  
void   testIsRestrictedByOpenBaseDir()  
void   testIsRestrictedByOpenBaseDirForMatchAllOpenBaseDir()  
void   testIsUploadedFile()  
void   testIsWriteable()  
void   testLegalizePathComponent()  
void   testLegalizePathComponent3()  
void   testLegalizePathComponentForDirectory()  
void   testLegalizePathComponentUnknownExtension()  
void   testLegalizePathComponentWithBlacklistedExtension()  
void   testMailUsesUnixLineEndings()  
void   testMkdir()  
void   testMoveUploadedFile()  
void   testOpenAndReadTillEof()  
void   testOpendir()  
void   testOpenMissingFile()  
void   testOpenWriteAndClose()   Verify that we can write a few bytes to a file.
void   testPathComponentDotInFileBaseToUnderscore()  
void   testPathComponentDotPhpExtensionToUnderscore()  
void   testPathComponentDotRecognizedExtensionConserved()  
void   testPathComponentDotUnderscoreToUnderscoreUnderscore()  
void   testPathComponentDotUnrecognizedExtensionToUnderscore()  
void   testPathComponentIllegalCharactersToUnderscores()  
void   testPathComponentLegalCharactersConserved()  
void   testPermissions()   Make sure files are written with correct permissions by exec, copy, symlink, atomicWrite; test chmod.
void   testReaddir()  
void   testRecursiveChmod1()  
void   testRecursiveChmod2()  
void   testRecursiveChmod3()  
void   testRecursiveRmdir()  
void   testRename()  
void   testRmdir()  
void   testSplitPath()  
void   testStat()  
void   testStrftime()  
void   testSymlink()  
void   testTempnam()  
void   testUnlink()  
void   _permissionTest()  
void   _setupChmodTest()  

[ Top ]
Methods
Constructor PlatformTest  [line 35]

  PlatformTest PlatformTest( $methodName  )

Parameters:
   $methodName: 


[ Top ]
ignore_error_handler  [line 774]

  void ignore_error_handler( $errno, $errstr  )

Parameters:
   $errno: 
   $errstr: 


[ Top ]
setUp  [line 39]

  void setUp( )



Redefinition of:
GalleryTestCase::setUp()

[ Top ]
tearDown  [line 56]

  void tearDown( )



Redefinition of:
GalleryTestCase::tearDown()

[ Top ]
testAtomicWrite  [line 825]

  void testAtomicWrite( )



[ Top ]
testChdir  [line 862]

  void testChdir( )



[ Top ]
testCopy  [line 68]

  void testCopy( )



[ Top ]
testExec  [line 329]

  void testExec( )

Make sure executing a bogus path fails.

XXX: This is a pretty weak test. It's hard to improve it without actually shipping a known-good script though.



[ Top ]
testExecWithSpaceInG2DataPath  [line 337]

  void testExecWithSpaceInG2DataPath( )

Verify bugfix: quotes around redirect file for stderr output, in case path has a space



[ Top ]
testFile  [line 158]

  void testFile( )



[ Top ]
testFileExists  [line 109]

  void testFileExists( )



[ Top ]
testFileGetAndPutContents  [line 889]

  void testFileGetAndPutContents( )



[ Top ]
testFilesize  [line 153]

  void testFilesize( )



[ Top ]
testFopen  [line 165]

  void testFopen( )



[ Top ]
testFsockopen  [line 767]

  void testFsockopen( )

Try opening a socket to the current web server.



[ Top ]
testFsockopenBadHost  [line 779]

  void testFsockopenBadHost( )

Try opening a socket to a bogus web server.



[ Top ]
testGetDirectorySeparator  [line 584]

  void testGetDirectorySeparator( )



[ Top ]
testGetLineEnding  [line 590]

  void testGetLineEnding( )



[ Top ]
testIsDir  [line 118]

  void testIsDir( )



[ Top ]
testIsExecutable  [line 145]

  void testIsExecutable( )



[ Top ]
testIsFile  [line 123]

  void testIsFile( )



[ Top ]
testIsLegalPathComponent  [line 228]

  void testIsLegalPathComponent( )



[ Top ]
testIsLegalPathComponentForAllowedExtension  [line 312]

  void testIsLegalPathComponentForAllowedExtension( )



[ Top ]
testIsLegalPathComponentForBlacklistedExtension  [line 317]

  void testIsLegalPathComponentForBlacklistedExtension( )



[ Top ]
testIsLegalPathComponentWithDotForDirectory  [line 302]

  void testIsLegalPathComponentWithDotForDirectory( )



[ Top ]
testIsLink  [line 114]

  void testIsLink( )



[ Top ]
testIsReadable  [line 137]

  void testIsReadable( )



[ Top ]
testIsRestrictedByOpenBaseDir  [line 601]

  void testIsRestrictedByOpenBaseDir( )



[ Top ]
testIsRestrictedByOpenBaseDirForMatchAllOpenBaseDir  [line 752]

  void testIsRestrictedByOpenBaseDirForMatchAllOpenBaseDir( )



[ Top ]
testIsUploadedFile  [line 141]

  void testIsUploadedFile( )



[ Top ]
testIsWriteable  [line 128]

  void testIsWriteable( )



[ Top ]
testLegalizePathComponent  [line 233]

  void testLegalizePathComponent( )



[ Top ]
testLegalizePathComponent3  [line 243]

  void testLegalizePathComponent3( )



[ Top ]
testLegalizePathComponentForDirectory  [line 248]

  void testLegalizePathComponentForDirectory( )



[ Top ]
testLegalizePathComponentUnknownExtension  [line 238]

  void testLegalizePathComponentUnknownExtension( )



[ Top ]
testLegalizePathComponentWithBlacklistedExtension  [line 307]

  void testLegalizePathComponentWithBlacklistedExtension( )



[ Top ]
testMailUsesUnixLineEndings  [line 901]

  void testMailUsesUnixLineEndings( )



[ Top ]
testMkdir  [line 223]

  void testMkdir( )



[ Top ]
testMoveUploadedFile  [line 104]

  void testMoveUploadedFile( )



[ Top ]
testOpenAndReadTillEof  [line 803]

  void testOpenAndReadTillEof( )



[ Top ]
testOpendir  [line 171]

  void testOpendir( )



[ Top ]
testOpenMissingFile  [line 816]

  void testOpenMissingFile( )



[ Top ]
testOpenWriteAndClose  [line 791]

  void testOpenWriteAndClose( )

Verify that we can write a few bytes to a file.



[ Top ]
testPathComponentDotInFileBaseToUnderscore  [line 267]

  void testPathComponentDotInFileBaseToUnderscore( )



[ Top ]
testPathComponentDotPhpExtensionToUnderscore  [line 288]

  void testPathComponentDotPhpExtensionToUnderscore( )



[ Top ]
testPathComponentDotRecognizedExtensionConserved  [line 274]

  void testPathComponentDotRecognizedExtensionConserved( )



[ Top ]
testPathComponentDotUnderscoreToUnderscoreUnderscore  [line 295]

  void testPathComponentDotUnderscoreToUnderscoreUnderscore( )



[ Top ]
testPathComponentDotUnrecognizedExtensionToUnderscore  [line 281]

  void testPathComponentDotUnrecognizedExtensionToUnderscore( )



[ Top ]
testPathComponentIllegalCharactersToUnderscores  [line 260]

  void testPathComponentIllegalCharactersToUnderscores( )



[ Top ]
testPathComponentLegalCharactersConserved  [line 253]

  void testPathComponentLegalCharactersConserved( )



[ Top ]
testPermissions  [line 358]

  void testPermissions( )

Make sure files are written with correct permissions by exec, copy, symlink, atomicWrite; test chmod.



[ Top ]
testReaddir  [line 177]

  void testReaddir( )



[ Top ]
testRecursiveChmod1  [line 488]

  void testRecursiveChmod1( )



[ Top ]
testRecursiveChmod2  [line 519]

  void testRecursiveChmod2( )



[ Top ]
testRecursiveChmod3  [line 551]

  void testRecursiveChmod3( )



[ Top ]
testRecursiveRmdir  [line 215]

  void testRecursiveRmdir( )



[ Top ]
testRename  [line 188]

  void testRename( )



[ Top ]
testRmdir  [line 204]

  void testRmdir( )



[ Top ]
testSplitPath  [line 846]

  void testSplitPath( )



[ Top ]
testStat  [line 195]

  void testStat( )



[ Top ]
testStrftime  [line 877]

  void testStrftime( )



[ Top ]
testSymlink  [line 73]

  void testSymlink( )



[ Top ]
testTempnam  [line 80]

  void testTempnam( )



[ Top ]
testUnlink  [line 199]

  void testUnlink( )



[ Top ]
_permissionTest  [line 401]

  void _permissionTest( $expectedPermissions, $testNumber, $tests  )

Parameters:
   $expectedPermissions: 
   $testNumber: 
   $tests: 


[ Top ]
_setupChmodTest  [line 464]

  void _setupChmodTest( )



[ Top ]

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