Skip to content

Commit e26ae65

Browse files
committed
✅ breaking tapestry out of testplugin method
1 parent f8fd9d0 commit e26ae65

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/PluginTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public static function tearDownAfterClass()
5959
$tool->dropDatabase();
6060
}
6161

62-
public function testPlugin(){
62+
public static function runTapestry($siteDir = __DIR__ . DIRECTORY_SEPARATOR . 'mock_project') {
6363
$definitions = new DefaultInputDefinition();
6464
$tapestry = new Tapestry(new ArrayInput([
65-
'--site-dir' => __DIR__ . DIRECTORY_SEPARATOR . 'mock_project',
65+
'--site-dir' => $siteDir,
6666
'--env' => 'testing'
6767
], $definitions));
6868

@@ -74,6 +74,12 @@ public function testPlugin(){
7474
$project = $tapestry->getContainer()->get(Project::class);
7575
$generator->generate($project, new NullOutput());
7676

77+
return $tapestry;
78+
}
79+
80+
public function testPlugin(){
81+
self::runTapestry();
82+
7783
$contentTypes = self::$em->getRepository(ContentType::class)->findAll();
7884

7985
$this->assertCount(2, $contentTypes);

0 commit comments

Comments
 (0)