static function TestFileTransfer::factory in SimpleTest 7
Classes that extend this class must override the factory() static method.
Parameters
string $jail: The full path where all file operations performed by this object will be restricted to. This prevents the FileTransfer classes from being able to touch other parts of the filesystem.
array $settings: An array of connection settings for the FileTransfer subclass. If the getSettingsForm() method uses any nested settings, the same structure will be assumed here.
Return value
object New instance of the appropriate FileTransfer subclass.
Overrides FileTransfer::factory
1 call to TestFileTransfer::factory()
- FileTranferTest::setUp in tests/
filetransfer.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
File
- tests/
filetransfer.test, line 109
Class
- TestFileTransfer
- Mock FileTransfer object for test case.
Code
static function factory($jail, $settings) {
return new TestFileTransfer($jail, $settings['username'], $settings['password'], $settings['hostname'], $settings['port']);
}