|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of php-cache\cache-bundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* This source file is subject to the MIT license that is bundled |
|
9
|
|
|
* with this source code in the file LICENSE. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Cache\CacheBundle\Tests\Functional; |
|
13
|
|
|
|
|
14
|
|
|
use Cache\Bridge\Doctrine\DoctrineCacheBridge; |
|
15
|
|
|
use Cache\CacheBundle\Bridge\SymfonyValidatorBridge; |
|
16
|
|
|
use Cache\CacheBundle\CacheBundle; |
|
17
|
|
|
use Cache\CacheBundle\Routing\CachingRouter; |
|
18
|
|
|
use Cache\SessionHandler\Psr6SessionHandler; |
|
19
|
|
|
use Nyholm\BundleTest\BaseBundleTestCase; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @author Tobias Nyholm <[email protected]> |
|
23
|
|
|
*/ |
|
24
|
|
|
class BundleInitializationTest extends BaseBundleTestCase |
|
25
|
|
|
{ |
|
26
|
|
|
protected function getBundleClass() |
|
27
|
|
|
{ |
|
28
|
|
|
return CacheBundle::class; |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
protected function setUp() |
|
32
|
|
|
{ |
|
33
|
|
|
parent::setUp(); |
|
34
|
|
|
$kernel = $this->createKernel(); |
|
35
|
|
|
$kernel->addConfigFile(__DIR__.'/config.yml'); |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
public function testInitBundle() |
|
39
|
|
|
{ |
|
40
|
|
|
$this->bootKernel(); |
|
41
|
|
|
$container = $this->getContainer(); |
|
42
|
|
|
|
|
43
|
|
|
$this->assertTrue($container->hasParameter('cache.provider_service_ids')); |
|
44
|
|
|
$this->assertInstanceOf(DoctrineCacheBridge::class, $container->get('cache.service.annotation')); |
|
45
|
|
|
$this->assertInstanceOf(DoctrineCacheBridge::class, $container->get('cache.service.serializer')); |
|
46
|
|
|
$this->assertInstanceOf(SymfonyValidatorBridge::class, $container->get('cache.service.validation')); |
|
47
|
|
|
$this->assertInstanceOf(Psr6SessionHandler::class, $container->get('cache.service.session')); |
|
48
|
|
|
$this->assertInstanceOf(CachingRouter::class, $container->get('cache.service.router')); |
|
49
|
|
|
} |
|
50
|
|
|
} |
|
51
|
|
|
|