Development

- Added dependency injection support.
- Added php-di composer dependency.
- Added `ClassLoader` class.
- Added `IClassLoader` interface.
- Added unit-tests for dependency injection.
- Updated documentation to reflect new features.
This commit is contained in:
Simon Sessingø
2018-03-29 21:16:02 +02:00
parent cca2f5cb88
commit af2ac6031d
17 changed files with 382 additions and 68 deletions
+4 -5
View File
@@ -5,14 +5,13 @@ require_once 'Dummy/DummyController.php';
class GroupTest extends \PHPUnit\Framework\TestCase
{
protected $result;
public function testGroupLoad()
{
$this->result = false;
$result = false;
TestRouter::group(['prefix' => '/group'], function () {
$this->result = true;
TestRouter::group(['prefix' => '/group'], function () use(&$result) {
$result = true;
});
try {
@@ -20,7 +19,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
} catch(\Exception $e) {
}
$this->assertTrue($this->result);
$this->assertTrue($result);
}
public function testNestedGroup()