Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added unit test bootstrap

  • Loading branch information...
commit 5a6f817e193acb3dc7146d7f738914f4e1ba3b6a 1 parent 68ebf78
@BenExile authored
Showing with 25 additions and 16 deletions.
  1. +23 −0 tests/bootstrap.php
  2. +2 −16 tests/setup.php
View
23 tests/bootstrap.php
@@ -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
18 tests/setup.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.