ItemAddFromServerTest ItemAddFromServerTest(
$methodName
)
|
|
Parameters:
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
in pathComponent, title and summary
void testAddFromServerG2DataDir(
)
|
|
Checks that we disallow recursive add from our own g2data directory.
void testAddFromServerMalformedInput(
)
|
|
void testAddItemWithXssFilename(
)
|
|
void testInvalidLocalServerPath(
)
|
|
void testIsAppropriate(
)
|
|
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: |
|