Permalink
Browse files

Added unit test bootstrap

  • Loading branch information...
1 parent 68ebf78 commit 5a6f817e193acb3dc7146d7f738914f4e1ba3b6a Ben Tadiar committed Feb 26, 2012
Showing with 25 additions and 16 deletions.
  1. +23 −0 tests/bootstrap.php
  2. +2 −16 tests/setup.php
View
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * A bootstrap for the Dropbox SDK unit tests
+ * @link https://github.com/BenTheDesigner/Dropbox/tree/master/tests
+ */
+
+// Restrict access to the command line
+if (PHP_SAPI !== 'cli') {
+ exit('setup.php must be run via the command line interface');
+}
+
+// Set error reporting
+error_reporting(-1);
+ini_set('display_errors', 'On');
+ini_set('html_errors', 'Off');
+session_start();
+
+// Register a simple autoload function
+spl_autoload_register(function($class){
+ $class = str_replace('\\', '/', $class);
+ require_once('../' . $class . '.php');
+});
View
@@ -6,22 +6,8 @@
* @link https://github.com/BenTheDesigner/Dropbox/tree/master/tests
*/
-// Restrict access to the command line
-if (PHP_SAPI !== 'cli') {
- exit('setup.php must be run via the command line interface');
-}
-
-// Set error reporting
-error_reporting(-1);
-ini_set('display_errors', 'On');
-ini_set('html_errors', 'Off');
-session_start();
-
-// Register a simple autoload function
-spl_autoload_register(function($class){
- $class = str_replace('\\', '/', $class);
- require_once('../' . $class . '.php');
-});
+// Require the bootstrap
+require_once('bootstrap.php');
echo 'Running Dropbox Test Suite Setup...' . PHP_EOL;

0 comments on commit 5a6f817

Please sign in to comment.