mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user