Skip to content

Commit 6cdc503

Browse files
alongoszadamwojs
authored andcommitted
[Tests] Improved \Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\BaseFlysystemTestCase
1 parent db38e5b commit 6cdc503

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tests/bundle/IO/EventListener/StreamFileListenerTest.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
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

89
namespace Ibexa\Tests\Bundle\IO\EventListener;
910

@@ -19,7 +20,10 @@
1920
use Symfony\Component\HttpKernel\Event\RequestEvent;
2021
use 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

Comments
 (0)