Development

- Fixed issue causing default-namespace to add duplicate namespace when using type-hints (issue: #561).
- Fixed phpstan issues.
- Tests: Fixed TestRouter not resetting namespace upon reset.
- Tests: Added NSController (namespace controller) class.
- Tests: added test for class hint + default namespace case.
- Composer: added phpstan support + configuration.
- Composer: updated phpunit version.
This commit is contained in:
Simon Sessingø
2021-06-09 08:54:24 +02:00
parent 4dff4006bf
commit 5cd6cab801
16 changed files with 107 additions and 57 deletions
+4 -2
View File
@@ -22,12 +22,14 @@ class TestRouter extends \Pecee\SimpleRouter\SimpleRouter
{
try {
static::debugNoReset($testUrl, $testMethod);
} catch(\Exception $e) {
} catch (\Exception $e) {
static::$defaultNamespace = null;
static::router()->reset();
throw $e;
}
if($reset === true) {
if ($reset === true) {
static::$defaultNamespace = null;
static::router()->reset();
}