diff --git a/.gitignore b/.gitignore
index 3a08e110..a2b08c12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,6 @@ public/js/cache/*
composer.lock
*.sqlite
*.db
-*.sqlite3
\ No newline at end of file
+*.sqlite3
+docs/*
+coverage/*
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..52558996
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,12 @@
+language: php
+
+install:
+ - composer install
+
+php:
+ - 5.4
+ - 5.5
+ - 5.6
+ - 7
+ - hhvm
+ - nightly
\ No newline at end of file
diff --git a/README.md b/README.md
index 44e77a0e..9819e1bb 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ A self-hosted client that allows custom formatting of data from the hummingbird
* PHP 5.4+
* PDO SQLite (For collection tab)
+* GD
### Installation
diff --git a/app/base/pre_conf_functions.php b/app/base/pre_conf_functions.php
new file mode 100644
index 00000000..4faadd9e
--- /dev/null
+++ b/app/base/pre_conf_functions.php
@@ -0,0 +1,40 @@
+ [],
'Plan to Read' => [],
diff --git a/index.php b/index.php
index 6bbf992e..1677be43 100644
--- a/index.php
+++ b/index.php
@@ -3,43 +3,38 @@
* Here begins everything!
*/
+// -----------------------------------------------------------------------------
+// ! Start config
+// -----------------------------------------------------------------------------
+
/**
* Well, whose list is it?
*/
define('WHOSE', "Tim's");
-/**
- * Joins paths together. Variadic to take an
- * arbitrary number of arguments
- *
- * @return string
- */
-function _dir() { return implode(DIRECTORY_SEPARATOR, func_get_args()); }
+// -----------------------------------------------------------------------------
+// ! End config
+// -----------------------------------------------------------------------------
+
+// Work around the silly timezone error
+$timezone = ini_get('date.timezone');
+if ($timezone === '' || $timezone === FALSE)
+{
+ ini_set('date.timezone', 'GMT');
+}
define('ROOT_DIR', __DIR__);
-define('APP_DIR', _dir(ROOT_DIR, 'app'));
-define('CONF_DIR', _dir(APP_DIR, 'config'));
-define('BASE_DIR', _dir(APP_DIR, 'base'));
+define('APP_DIR', ROOT_DIR . DIRECTORY_SEPARATOR . 'app');
+define('CONF_DIR', APP_DIR . DIRECTORY_SEPARATOR . 'config');
+define('BASE_DIR', APP_DIR . DIRECTORY_SEPARATOR . 'base');
+require BASE_DIR . DIRECTORY_SEPARATOR . 'pre_conf_functions.php';
// Load config and global functions
$config = require _dir(APP_DIR, '/config/config.php');
require _dir(BASE_DIR, '/functions.php');
// Setup autoloaders
-require _dir(ROOT_DIR, '/vendor/autoload.php');
-spl_autoload_register(function ($class) {
- $dirs = ["base", "controllers", "models"];
-
- foreach($dirs as $dir)
- {
- $file = _dir(APP_DIR, $dir, "{$class}.php");
- if (file_exists($file))
- {
- require_once $file;
- return;
- }
- }
-});
+_setup_autoloaders();
session_start();
diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml
new file mode 100644
index 00000000..7dd06d43
--- /dev/null
+++ b/phpdoc.dist.xml
@@ -0,0 +1,23 @@
+
+
+ Hummingbird Anime Client
+
+ docs
+
+
+ docs
+
+
+
+
+
+ .
+ app
+ public/*
+ app/views/*
+ app/config/*
+ migrations/*
+ tests/*
+ vendor/*
+
+
\ No newline at end of file
diff --git a/phpunit.xml b/phpunit.xml
new file mode 100644
index 00000000..8c240fbe
--- /dev/null
+++ b/phpunit.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ app
+
+
+
+
+ tests/base
+
+
+
\ No newline at end of file
diff --git a/tests/base/CoreTest.php b/tests/base/CoreTest.php
new file mode 100644
index 00000000..44976283
--- /dev/null
+++ b/tests/base/CoreTest.php
@@ -0,0 +1,22 @@
+assertTrue(version_compare(PHP_VERSION, "5.4", "ge"));
+ }
+
+ public function testRequirements()
+ {
+ // Check required extensions
+ $this->assertTrue(extension_loaded('gd'));
+ $this->assertTrue(extension_loaded('mcrypt'));
+
+ // Check for pdo_sqlite
+ $this->assertTrue(class_exists('PDO'));
+ $drivers = PDO::getAvailableDrivers();
+ $this->assertTrue(in_array('sqlite', $drivers));
+ }
+
+}
\ No newline at end of file
diff --git a/tests/base/FunctionsTest.php b/tests/base/FunctionsTest.php
new file mode 100644
index 00000000..56ba4bd4
--- /dev/null
+++ b/tests/base/FunctionsTest.php
@@ -0,0 +1,23 @@
+assertEquals('foo'.DIRECTORY_SEPARATOR.'bar', _dir('foo', 'bar'));
+ }
+
+ public function testIsSelected()
+ {
+
+ }
+
+ public function testIsNotSelected()
+ {
+
+ }
+
+}
\ No newline at end of file
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 00000000..83f050d0
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,39 @@
+