Using Composer to get dBug. Fixes #2

This commit is contained in:
Adam Backstrom 2013-07-25 17:48:02 -04:00
parent 6411207e3e
commit f6979edb76
7 changed files with 29 additions and 6 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
composer.lock
vendor

View File

@ -1,2 +1,5 @@
all:
composer install
test:
phpunit --bootstrap tests/bootstrap.php tests

View File

@ -1,5 +1,7 @@
<?php
use \Ospinto\Dbug;
abstract class AbstractAction
{
protected $value;

5
composer.json Normal file
View File

@ -0,0 +1,5 @@
{
"require": {
"sunra/dbug": "dev-master"
}
}

View File

@ -9,9 +9,10 @@
<?php
require_once 'dBug.php';
require_once 'classes.php';
require_once 'functions.php';
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/classes.php';
require __DIR__ . '/functions.php';
?>

View File

@ -0,0 +1,10 @@
<?php
class DbugFormatterTest extends PHPUnit_Framework_TestCase {
function testFormat() {
$formatter = new DbugFormatter;
$s = 'mine' . $_SERVER['REQUEST_TIME'] . sha1(time() . mt_rand());
$this->assertContains($s, $formatter->format($s));
}
}

View File

@ -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';