Skip to content

Commit 49360da

Browse files
committed
Removed "aequasi*" and using composer autoload for tests
1 parent b9afbc9 commit 49360da

File tree

9 files changed

+57
-115
lines changed

9 files changed

+57
-115
lines changed

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
processIsolation="false"
1010
stopOnFailure="false"
1111
syntaxCheck="false"
12-
bootstrap="tests/bootstrap.php"
12+
bootstrap="vendor/autoload.php"
1313
>
1414
<testsuites>
1515
<testsuite name="CacheBundle for the Symfony2 Framework">

src/DependencyInjection/CacheExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
1919

2020
/**
21-
* Class AequasiCacheExtension
21+
* Class CacheExtension
2222
*
2323
* @author Aaron Scherer <[email protected]>
2424
*/

src/DependencyInjection/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getConfigTreeBuilder()
4242
}
4343

4444
/**
45-
* Configure the "aequasi_cache.session" section
45+
* Configure the "cache.session" section
4646
*
4747
* @return ArrayNodeDefinition
4848
*/
@@ -69,7 +69,7 @@ private function addSessionSupportSection()
6969
}
7070

7171
/**
72-
* Configure the "aequasi_cache.doctrine" section
72+
* Configure the "cache.doctrine" section
7373
*
7474
* @return ArrayNodeDefinition
7575
*/
@@ -127,7 +127,7 @@ function ($v) {
127127
}
128128

129129
/**
130-
* Configure the "aequasi_cache.router" section
130+
* Configure the "cache.router" section
131131
*
132132
* @return ArrayNodeDefinition
133133
*/

tests/DependencyInjection/AequasiCacheExtensionTest.php

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[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\DependencyInjection;
13+
14+
use Cache\CacheBundle\Tests\TestCase;
15+
use Aequasi\Cache\DoctrineCacheBridge;
16+
use Psr\Cache\CacheItemPoolInterface;
17+
18+
/**
19+
* Class CacheExtensionTest
20+
*
21+
* @author Aaron Scherer <[email protected]>
22+
*/
23+
class CacheExtensionTest extends TestCase
24+
{
25+
26+
/**
27+
*
28+
*/
29+
public function testRouterBuilder()
30+
{
31+
$container = $this->createContainerFromFile('router');
32+
33+
$config = $container->getParameter($this->getAlias().'.router');
34+
35+
$this->assertTrue(isset($config['enabled']));
36+
37+
$this->assertTrue($config['enabled']);
38+
$this->assertEquals($config['service_id'], 'default');
39+
}
40+
41+
/**
42+
* @return string
43+
*/
44+
private function getAlias()
45+
{
46+
return 'cache';
47+
}
48+
}

tests/Fixtures/router.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
aequasi_cache:
2-
instances:
3-
default:
4-
type: array
1+
cache:
52
router:
63
enabled: true
7-
instance: default
4+
service_id: default

tests/Fixtures/service.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Cache\CacheBundle\Tests;
1313

14-
use Cache\CacheBundle\DependencyInjection\AequasiCacheExtension;
14+
use Cache\CacheBundle\DependencyInjection\CacheExtension;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
1717
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
@@ -64,7 +64,7 @@ protected function createContainer(array $data = array())
6464
protected function createContainerFromFile($file, $data = array())
6565
{
6666
$container = $this->createContainer($data);
67-
$container->registerExtension(new AequasiCacheExtension());
67+
$container->registerExtension(new CacheExtension());
6868
$this->loadFromFile($container, $file);
6969

7070
$container->getCompilerPassConfig()

tests/bootstrap.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)