Using Composer to get dBug. Fixes #2
This commit is contained in:
parent
6411207e3e
commit
f6979edb76
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
composer.lock
|
||||||
|
vendor
|
3
Makefile
3
Makefile
@ -1,2 +1,5 @@
|
|||||||
|
all:
|
||||||
|
composer install
|
||||||
|
|
||||||
test:
|
test:
|
||||||
phpunit --bootstrap tests/bootstrap.php tests
|
phpunit --bootstrap tests/bootstrap.php tests
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use \Ospinto\Dbug;
|
||||||
|
|
||||||
abstract class AbstractAction
|
abstract class AbstractAction
|
||||||
{
|
{
|
||||||
protected $value;
|
protected $value;
|
||||||
|
5
composer.json
Normal file
5
composer.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"sunra/dbug": "dev-master"
|
||||||
|
}
|
||||||
|
}
|
@ -9,9 +9,10 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'dBug.php';
|
require __DIR__ . '/vendor/autoload.php';
|
||||||
require_once 'classes.php';
|
|
||||||
require_once 'functions.php';
|
require __DIR__ . '/classes.php';
|
||||||
|
require __DIR__ . '/functions.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
10
tests/DbugFormatterTest.php
Normal file
10
tests/DbugFormatterTest.php
Normal 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));
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
|
|
||||||
require_once 'dBug.php';
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
require_once 'classes.php';
|
require dirname(__DIR__) . '/classes.php';
|
||||||
require_once 'functions.php';
|
require dirname(__DIR__) . '/functions.php';
|
||||||
|
Loading…
Reference in New Issue
Block a user