Skip to content

Commit 3a41199

Browse files
author
Daniyal Hamid
committed
Added test for appending middleware via App::use
1 parent ed5b52f commit 3a41199

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/AppTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ public function testUseWithDifferentTypesOfMiddleware($middleware): void
105105
}
106106
}
107107

108+
public function testCanAppendMiddleware(): void
109+
{
110+
$this->app->use([HelloWorldMiddleware::class]);
111+
$this->app->use(['BitFrame\Test\Asset\helloWorldCallable']);
112+
113+
$this->assertSame(count($this->app->getMiddlewares()), 2);
114+
}
115+
108116
public function testCanGetContainerViaHandlerInCallback(): void
109117
{
110118
$app = $this->app;

0 commit comments

Comments
 (0)