Skip to content

Commit d7e6c7b

Browse files
committed
simplifying test code
1 parent f88b96d commit d7e6c7b

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

tests/IntegrationTest.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727

2828
class IntegrationTest extends TestCase
2929
{
30-
public function setUp(): void
31-
{
32-
$fs = new Filesystem();
33-
$fs->remove(__DIR__.'/../var');
34-
}
35-
3630
/**
3731
* @dataProvider integrationProvider
3832
*/
@@ -72,16 +66,9 @@ public function testIntegration(string $folder)
7266
);
7367
}
7468

75-
/*
76-
* TODO - get this from the Builder when it is exposed
77-
* https://github.com/doctrine/rst-parser/pull/97
78-
*/
79-
$metas = new Metas();
80-
$cachedMetasLoader = new CachedMetasLoader();
81-
$cachedMetasLoader->loadCachedMetaEntries(__DIR__.'/_output', $metas);
82-
69+
$metas = $builder->getMetas();
8370
$jsonGenerator = new JsonGenerator($metas, $buildConfig);
84-
$jsonGenerator->generateJson(new ProgressBar(new NullOutput()));
71+
$jsonGenerator->generateJson();
8572

8673
foreach ($finder as $htmlFile) {
8774
$relativePath = $htmlFile->getRelativePathname();
@@ -287,8 +274,9 @@ private function createBuildConfig(string $sourceDir): BuildConfig
287274
return (new BuildConfig())
288275
->setSymfonyVersion('4.0')
289276
->setContentDir($sourceDir)
277+
->disableBuildCache()
290278
->setOutputDir(__DIR__.'/_output')
291-
->setCacheDir(__DIR__.'/_cache');
279+
;
292280
}
293281

294282
private function createIndenter(): Indenter

0 commit comments

Comments
 (0)