Skip to content

Commit 7826980

Browse files
committed
fix tcg test
1 parent 049a628 commit 7826980

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/Util/TemplateComponentGeneratorTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace Symfony\Bundle\MakerBundle\Tests\Util;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bundle\MakerBundle\MakerBundle;
16+
use Symfony\Bundle\MakerBundle\Util\ClassSource\Model\ClassData;
1517
use Symfony\Bundle\MakerBundle\Util\TemplateComponentGenerator;
1618

1719
/**
@@ -94,10 +96,13 @@ public function routeTrailingNewLineDataProvider(): \Generator
9496
*/
9597
public function testGetFinalClassDeclaration(bool $finalClass, bool $finalEntity, bool $isEntity, string $expectedResult): void
9698
{
97-
$this->markTestIncomplete('We wont need this...');
9899
$generator = new TemplateComponentGenerator($finalClass, $finalEntity);
99100

100-
self::assertSame($expectedResult, $generator->getFinalDeclaration($isEntity));
101+
$classData = ClassData::create(MakerBundle::class, isEntity: $isEntity);
102+
103+
$generator->configureClass($classData);
104+
105+
self::assertSame(sprintf('%sclass MakerBundle', $expectedResult), $classData->getClassDeclaration());
101106
}
102107

103108
public function finalClassDataProvider(): \Generator

0 commit comments

Comments
 (0)