Permalink
Browse files

Fix PHP Fatal error: Class 'ExportServiceUserDataController' not foun…

…d error
  • Loading branch information...
1 parent 150a90a commit e99dbd8d952459f4c5378d42c70f69680f11466d @ginatrapani ginatrapani committed Mar 13, 2012
Showing with 28 additions and 4 deletions.
  1. +26 −0 tests/WebTestOfApplicationSettings.php
  2. +2 −4 webapp/install/exportuserdata.php
@@ -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");
+ }
}
@@ -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.