44 * @copyright Copyright (C) Ibexa AS. All rights reserved. 
55 * @license For full copyright and license information view LICENSE file distributed with this source code. 
66 */ 
7+ declare (strict_types=1 );
78
89namespace  Ibexa \Tests \Bundle \IO \EventListener ;
910
1920use  Symfony \Component \HttpKernel \Event \RequestEvent ;
2021use  Symfony \Component \HttpKernel \HttpKernelInterface ;
2122
22- class  StreamFileListenerTest extends  TestCase
23+ /** 
24+  * @covers \Ibexa\Bundle\IO\EventListener\StreamFileListener 
25+  */ 
26+ final  class  StreamFileListenerTest extends  TestCase
2327{
2428    private  StreamFileListener   $ eventListener ;
2529
@@ -36,6 +40,9 @@ protected function setUp(): void
3640        $ this  ->eventListener  = new  StreamFileListener ($ this  ->ioServiceMock , $ this  ->ioConfigResolverMock );
3741    }
3842
43+     /** 
44+      * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception 
45+      */ 
3946    public  function  testDoesNotRespondToNonIoUri (): void 
4047    {
4148        $ request  = $ this  ->createRequest ('/Not-an-image ' );
@@ -51,6 +58,9 @@ public function testDoesNotRespondToNonIoUri(): void
5158        self ::assertNull ($ event ->getResponse ());
5259    }
5360
61+     /** 
62+      * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception 
63+      */ 
5464    public  function  testDoesNotRespondToNoIoRequest (): void 
5565    {
5666        $ request  = $ this  ->createRequest ('/Not-an-image ' , 'bar.fr ' );
@@ -66,6 +76,9 @@ public function testDoesNotRespondToNoIoRequest(): void
6676        self ::assertNull ($ event ->getResponse ());
6777    }
6878
79+     /** 
80+      * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception 
81+      */ 
6982    public  function  testRespondsToIoUri (): void 
7083    {
7184        $ uri  = $ binaryFileUri  = '/var/test/storage/images/image.png ' ;
@@ -75,6 +88,9 @@ public function testRespondsToIoUri(): void
7588        $ this  ->assertOnKernelRequestResponse ($ request , $ urlPrefix , $ binaryFileUri );
7689    }
7790
91+     /** 
92+      * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception 
93+      */ 
7894    public  function  testRespondsToIoRequest (): void 
7995    {
8096        $ uri  = '/var/test/storage/images/image.png ' ;
@@ -109,6 +125,9 @@ protected function createEvent(Request $request): RequestEvent
109125        );
110126    }
111127
128+     /** 
129+      * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception 
130+      */ 
112131    private  function  assertOnKernelRequestResponse (Request   $ request , string  $ urlPrefix , string  $ binaryFileUri ): void 
113132    {
114133        $ this  ->configureIoUrlPrefix ($ urlPrefix );
0 commit comments