-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from boesing/bugfix/add-missing-adapter-plugin…
…manager-to-config-provider Add missing `AdapterPluginManager` service to `ConfigProvider`
- Loading branch information
Showing
4 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaminasTest\Serializer; | ||
|
||
use Laminas\Serializer\Adapter\AdapterInterface; | ||
use Laminas\Serializer\AdapterPluginManager; | ||
use Laminas\Serializer\ConfigProvider; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
final class ConfigProviderTest extends TestCase | ||
{ | ||
/** | ||
* @param non-empty-string $serviceName | ||
* @dataProvider factoryServiceNames | ||
*/ | ||
public function testHasExpectedServiceNames(string $serviceName): void | ||
{ | ||
$dependencies = (new ConfigProvider())->getDependencyConfig(); | ||
self::assertArrayHasKey($serviceName, $dependencies['factories']); | ||
} | ||
|
||
/** | ||
* @return iterable<non-empty-string,array{0:non-empty-string}> | ||
*/ | ||
public static function factoryServiceNames(): iterable | ||
{ | ||
return [ | ||
'SerializerAdapterManager' => ['SerializerAdapterManager'], | ||
AdapterPluginManager::class => [AdapterPluginManager::class], | ||
AdapterInterface::class => [AdapterInterface::class], | ||
]; | ||
} | ||
} |