Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix PHP Fatal error: Class 'ExportServiceUserDataController' not foun…
…d error
  • Loading branch information
ginatrapani committed Mar 13, 2012
1 parent 150a90a commit e99dbd8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
26 changes: 26 additions & 0 deletions tests/WebTestOfApplicationSettings.php
Expand Up @@ -105,4 +105,30 @@ public function testCSRFToken() {
$this->assertEqual($response_object->status, 'success');
$this->assertEqual($response_object->saved, 1);
}

public function testBackupAndExport() {
//Log in as admin
$this->get($this->url.'/session/login.php');
$this->setField('email', 'me@example.com');
$this->setField('pwd', 'secretpassword');
$this->click("Log In");
$this->click("Settings");
$this->assertTitle("Configure Your Account | " . Config::getInstance()->getValue('app_title_prefix') .
"ThinkUp");
$this->assertText('Logged in as admin: me@example.com');

//Test export link
$this->click("Export a single service user's data");
$this->assertText('Export Service User Data');
$this->assertText("To export and download a single service user's data, choose a service user and click on ".
"the Export User Data button. Extract the zip file and refer to the README.txt contained within for ".
"instructions on how to import the data into another ThinkUp database.");

//Test backup link
$this->click("Settings");
$this->click("Back up ThinkUp's entire database");
$this->assertText("Back Up Your ThinkUp Data");
$this->assertText("Click on the button below to back up your ThinkUp database. This new ThinkUp feature ".
"is in testing");
}
}
6 changes: 2 additions & 4 deletions webapp/install/exportuserdata.php
Expand Up @@ -25,9 +25,7 @@
* @license http://www.gnu.org/licenses/gpl.html
* @copyright 2009-2012 Gina Trapani, Dwi Widiastuti
*/
chdir("..");
require_once '_lib/model/class.Loader.php';
Loader::register();

chdir('..');
require_once 'init.php';
$controller = new ExportServiceUserDataController();
echo $controller->go();

0 comments on commit e99dbd8

Please sign in to comment.