Skip to content
This repository was archived by the owner on Feb 21, 2019. It is now read-only.

Commit aeae2eb

Browse files
committed
tests: removed dependency on CacheExtension
1 parent eeca3e5 commit aeae2eb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/Reflection.DI/ReflectionExtension.phpt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
use Nette\DI;
8-
use Nette\Bridges\CacheDI\CacheExtension;
98
use Nette\Bridges\ReflectionDI\ReflectionExtension;
109
use Nette\Reflection\AnnotationsParser;
1110
use Tester\Assert;
@@ -15,12 +14,17 @@ require __DIR__ . '/../bootstrap.php';
1514

1615

1716
test(function () {
17+
$loader = new DI\Config\Loader;
18+
$config = $loader->load(Tester\FileMock::create('
19+
services:
20+
cache: Nette\Caching\Storages\DevNullStorage
21+
', 'neon'));
22+
1823
$compiler = new DI\Compiler;
19-
$compiler->addExtension('cache', new CacheExtension(__DIR__));
2024
$compiler->addExtension('reflection', new ReflectionExtension);
21-
eval($compiler->compile(array(), 'Container1'));
25+
eval($compiler->compile($config, 'Container1'));
2226

2327
$container = new Container1;
2428
$container->initialize();
25-
Assert::type('Nette\Caching\Storages\FileStorage', AnnotationsParser::getCacheStorage());
29+
Assert::type('Nette\Caching\Storages\DevNullStorage', AnnotationsParser::getCacheStorage());
2630
});

0 commit comments

Comments
 (0)