From: nicolasconnault Date: Mon, 15 Sep 2008 13:45:14 +0000 (+0000) Subject: MDL-15666 Subclassing exporter class so that only local files are written X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3cc60460e8ed2947baeed10b769027452a657e83;p=moodle.git MDL-15666 Subclassing exporter class so that only local files are written --- diff --git a/lib/simpletest/portfolio_testclass.php b/lib/simpletest/portfolio_testclass.php index 3964e85aaf..6c99520d35 100644 --- a/lib/simpletest/portfolio_testclass.php +++ b/lib/simpletest/portfolio_testclass.php @@ -105,6 +105,20 @@ class portfolio_caller_test extends portfolio_caller_base { } } +class portfolio_exporter_test extends portfolio_exporter { + public function write_new_file($content, $name) { + + } + + public function copy_existing_file($oldfile) { + + } + + public function get_tempfiles() { + + } +} + /** * The following two classes are full mocks: none of their methods do anything, including their constructor. * They can be instantiated directly with no params (new portfolio_caller_test()) @@ -117,11 +131,11 @@ Mock::generate('portfolio_plugin_test', 'mock_plugin'); * They are instantiated by passing $this to the constructor within the test case class. */ Mock::generatePartial('portfolio_plugin_test', 'partialmock_plugin', array('send_package')); -Mock::generatePartial('portfolio_exporter', 'partialmock_exporter', array('process_stage_confirm', - 'process_stage_cleanup', - 'log_transfer', - 'save', - 'rewaken_object')); +Mock::generatePartial('portfolio_exporter_test', 'partialmock_exporter', array('process_stage_confirm', + 'process_stage_cleanup', + 'log_transfer', + 'save', + 'rewaken_object')); // Generate a mock class for each plugin subclass present