make('e_marketplace_adapter_wsdl', [ 'getRemoteFile' => function($remote_url, $local_file, $type='temp') { file_put_contents(e_TEMP.$local_file, /** * Zip file containing: * thing/ * thing/plugin.php * thing/theme.php * thing/index.php * thing/README.md */ base64_decode( <<mp = $this->make('e_marketplace', [ 'adapter' => $mock_adapter ]); $this->mp->__construct(); } catch (Exception $e) { $this->assertTrue(false, "Couldn't load e_marketplace object"); } } /* public function testRenderLoginForm() { } */ public function testDownload() { $path = e_PLUGIN."thing"; $tempPath = e_TEMP."thing"; $id = 912; if(is_dir($path)) { e107::getFile()->removeDir($path); // rename($path, $path."_old_".time()); } if(is_dir($tempPath)) { e107::getFile()->removeDir($tempPath); // rename($tempPath, $tempPath."_old_".time()); } $status = $this->mp->download($id,'','plugin' ); $this->assertTrue($status,"Couldn't download plugin or move to plugin folder."); $exists = (is_dir($path) && count(scandir($path)) > 4); $this->assertTrue($exists,"plugin folder is missing files."); } /* public function testGenerateAuthKey() { } public function testCall() { } public function testGetVersionList() { } public function testHasAuthKey() { } public function testAdapter() { } public function testMakeAuthKey() { } public function testSetAuthKey() { } public function testGetDownloadModal() { }*/ }