Skip to content

Commit 740ce8e

Browse files
committed
[csm] fix incomplete test
1 parent c02f40a commit 740ce8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/Util/ClassSourceManipulatorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,15 +626,16 @@ public function getAddOneToOneRelationTests(): \Generator
626626

627627
public function testGenerationWithTabs(): void
628628
{
629-
$this->markTestIncomplete('We need to refactor the invoked addProperty method to pass an attribute node instead of an annotation array');
630629
$source = file_get_contents(__DIR__.'/fixtures/source/ProductWithTabs.php');
631630
$expectedSource = file_get_contents(__DIR__.'/fixtures/with_tabs/ProductWithTabs.php');
632631

633632
$manipulator = new ClassSourceManipulator($source);
634633

634+
$attribute = $manipulator->buildAttributeNode(Column::class, ['type' => 'string', 'length' => 255], 'ORM');
635+
635636
$method = (new \ReflectionObject($manipulator))->getMethod('addProperty');
636637
$method->setAccessible(true);
637-
$method->invoke($manipulator, 'name', ['@ORM\Column(type="string", length=255)']);
638+
$method->invoke($manipulator, name: 'name', attributes: [$attribute]);
638639

639640
$method = (new \ReflectionObject($manipulator))->getMethod('addGetter');
640641
$method->setAccessible(true);

0 commit comments

Comments
 (0)