eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\UrlTest::testToFieldValue PHP Method

testToFieldValue() public method

public testToFieldValue ( )
    public function testToFieldValue()
    {
        $text = "A link's text";
        $urlId = 842;
        $storageFieldValue = new StorageFieldValue();
        $storageFieldValue->dataText = $text;
        $storageFieldValue->dataInt = $urlId;
        $storageFieldValue->sortKeyString = false;
        $storageFieldValue->sortKeyInt = false;
        $fieldValue = new FieldValue();
        $this->converter->toFieldValue($storageFieldValue, $fieldValue);
        self::assertInternalType('array', $fieldValue->data);
        self::assertFalse($fieldValue->sortKey);
        self::assertSame($text, $fieldValue->data['text']);
        self::assertEquals($urlId, $fieldValue->data['urlId']);
    }