Skip to content

Commit fa02b3d

Browse files
committed
[Tests] Improved quality of LegacyDFSClusterTest
1 parent ce3000b commit fa02b3d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,35 @@
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\DependencyInjection\ConfigurationFactory\MetadataHandler;
910

10-
use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSCluster;
11+
use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory;
12+
use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSCluster as LegacyDFSClusterConfigurationFactory;
13+
use Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster;
1114
use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactoryTestCase;
1215
use Symfony\Component\DependencyInjection\Definition;
1316
use Symfony\Component\DependencyInjection\Reference;
1417

1518
final class LegacyDFSClusterTest extends ConfigurationFactoryTestCase
1619
{
17-
/**
18-
* Returns an instance of the tested factory.
19-
*
20-
* @return \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory
21-
*/
22-
public function provideTestedFactory()
20+
public function provideTestedFactory(): ConfigurationFactory
2321
{
24-
return new LegacyDFSCluster();
22+
return new LegacyDFSClusterConfigurationFactory();
2523
}
2624

2725
public function provideExpectedParentServiceId(): string
2826
{
29-
return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class;
27+
return LegacyDFSCluster::class;
3028
}
3129

32-
public function provideParentServiceDefinition()
30+
public function provideParentServiceDefinition(): Definition
3331
{
3432
return new Definition(null, [null]);
3533
}
3634

37-
public function provideHandlerConfiguration()
35+
public function provideHandlerConfiguration(): array
3836
{
3937
return ['connection' => 'doctrine.dbal.test_connection'];
4038
}
@@ -46,9 +44,9 @@ public function provideHandlerConfiguration()
4644
*
4745
* @param string $handlerServiceId id of the service that was registered by the compiler pass
4846
*/
49-
public function validateConfiguredHandler($handlerServiceId)
47+
public function validateConfiguredHandler(string $handlerServiceId): void
5048
{
51-
self::assertContainerBuilderHasServiceDefinitionWithArgument(
49+
$this->assertContainerBuilderHasServiceDefinitionWithArgument(
5250
$handlerServiceId,
5351
0,
5452
new Reference('doctrine.dbal.test_connection')

0 commit comments

Comments
 (0)