@@ -32,4 +32,28 @@ public function testThatProvidersExists()
3232 $ this ->assertContainerBuilderHasService ('cache.provider.foo ' , DummyAdapter::class);
3333 $ this ->assertContainerBuilderHasAlias ('cache ' , 'cache.provider.foo ' );
3434 }
35+
36+ public function testAliasProvidersExists ()
37+ {
38+ $ providers = ['foo ' => ['factory ' => 'cache.factory.array ' , 'aliases ' => ['alias_http ' ]]];
39+ $ this ->load (['providers ' => $ providers ]);
40+
41+ $ this ->assertContainerBuilderHasService ('cache.provider.foo ' , DummyAdapter::class);
42+ $ this ->assertContainerBuilderHasAlias ('cache ' , 'cache.provider.foo ' );
43+ $ this ->assertContainerBuilderHasAlias ('alias_http ' , 'cache.provider.foo ' );
44+ }
45+
46+ public function testDefaultAliasProvidersExists ()
47+ {
48+ $ providers = [
49+ 'foo ' => ['factory ' => 'cache.factory.array ' , 'aliases ' => ['alias_foo ' ]],
50+ 'bar ' => ['factory ' => 'cache.factory.array ' , 'aliases ' => ['alias_bar ' , 'alias_other ' ]],
51+ ];
52+ $ this ->load (['providers ' => $ providers ]);
53+
54+ $ this ->assertContainerBuilderHasService ('cache.provider.foo ' , DummyAdapter::class);
55+ $ this ->assertContainerBuilderHasAlias ('cache ' , 'cache.provider.foo ' );
56+ $ this ->assertContainerBuilderHasAlias ('alias_foo ' , 'cache.provider.foo ' );
57+ $ this ->assertContainerBuilderHasAlias ('alias_bar ' , 'cache.provider.bar ' );
58+ }
3559}
0 commit comments