Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Writer/DoctrineWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ public function finish()
}

/**
* {@inheritdoc}
* @param array $item
*
* @return object
*/
public function writeItem(array $item)
{
Expand All @@ -180,6 +182,8 @@ public function writeItem(array $item)
$this->updateEntity($item, $entity);

$this->entityManager->persist($entity);

return $entity;
}

/**
Expand Down
4 changes: 3 additions & 1 deletion tests/Writer/DoctrineWriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public function testWriteItem()
'secondProperty' => 'some other value',
'firstAssociation'=> $association
);
$writer->writeItem($item);
$entity = $writer->writeItem($item);

$this->assertInstanceOf('Ddeboer\DataImport\Tests\Fixtures\Entity\TestEntity', $entity);
}

protected function getEntityManager()
Expand Down