From f6979edb767164e8dfe351b0b02ddb21a94942fe Mon Sep 17 00:00:00 2001 From: Adam Backstrom Date: Thu, 25 Jul 2013 17:48:02 -0400 Subject: [PATCH] Using Composer to get dBug. Fixes #2 --- .gitignore | 2 ++ Makefile | 3 +++ classes.php | 2 ++ composer.json | 5 +++++ index.php | 7 ++++--- tests/DbugFormatterTest.php | 10 ++++++++++ tests/bootstrap.php | 6 +++--- 7 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 .gitignore create mode 100644 composer.json create mode 100644 tests/DbugFormatterTest.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..987e2a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor diff --git a/Makefile b/Makefile index e9972b4..4436c60 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,5 @@ +all: + composer install + test: phpunit --bootstrap tests/bootstrap.php tests diff --git a/classes.php b/classes.php index 047f8be..b0b2770 100644 --- a/classes.php +++ b/classes.php @@ -1,5 +1,7 @@ diff --git a/tests/DbugFormatterTest.php b/tests/DbugFormatterTest.php new file mode 100644 index 0000000..1461f3e --- /dev/null +++ b/tests/DbugFormatterTest.php @@ -0,0 +1,10 @@ +assertContains($s, $formatter->format($s)); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index f5fcfb3..b5ddaaa 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,6 +2,6 @@ date_default_timezone_set('UTC'); -require_once 'dBug.php'; -require_once 'classes.php'; -require_once 'functions.php'; +require dirname(__DIR__) . '/vendor/autoload.php'; +require dirname(__DIR__) . '/classes.php'; +require dirname(__DIR__) . '/functions.php';