Skip to content

Commit

Permalink
Updating and correcting the test
Browse files Browse the repository at this point in the history
updating the test
  • Loading branch information
amirkoklan committed Jun 5, 2017
1 parent 295382a commit ed3854a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/Form/FieldTypeHandler/RelationTest.php
Expand Up @@ -93,18 +93,12 @@ public function testAssertInstanceOfFieldTypeHandler()

public function testConvertFieldValueToForm()
{
$destinationContentId = 2;
$this->contentService->expects($this->once())
->method('loadContent')
->with($destinationContentId)
->willReturn($destinationContentId);

$relation = new Relation($this->repository, $this->translationHelper);
$relationValue = new RelationValue(2);

$returnedValue = $relation->convertFieldValueToForm($relationValue);

$this->assertEquals($destinationContentId, $returnedValue);
$this->assertEquals(2, $returnedValue);
}

public function testConvertFieldValueToFormNullDestinationContentId()
Expand Down

0 comments on commit ed3854a

Please sign in to comment.